Live data from Hacker News

Ask HN: Best language to share code between an Android and iOS app?

news.ycombinator.com

11–20 of 123 posts

Re: Ask HN: Best language to share code between an Android and iOS app?

#13
post #10

Just use JavaScript. Javascriptcore is a lightweight way to execute JavaScript on iOS and you can use V8 context or duktape on Android. This way you can also update code in your app without an app store update.

which is not allowed on iOS ...

Edit: Sorry for being unclear, was only referring to the updating JS on the fly and circumventing App Store part. Obviously (facepalm) ... ️

Re: Ask HN: Best language to share code between an Android and iOS app?

#16
post #10

Just use JavaScript. Javascriptcore is a lightweight way to execute JavaScript on iOS and you can use V8 context or duktape on Android. This way you can also update code in your app without an app store update.

which is not allowed on iOS ... Edit: Sorry for being unclear, was only referring to the updating JS on the fly and circumventing App Store part. Obviously (facepalm) ... ️

Which part isn't allowed? A project I worked on did this a few years ago.

Re: Ask HN: Best language to share code between an Android and iOS app?

#18
post #10

Just use JavaScript. Javascriptcore is a lightweight way to execute JavaScript on iOS and you can use V8 context or duktape on Android. This way you can also update code in your app without an app store update.

which is not allowed on iOS ... Edit: Sorry for being unclear, was only referring to the updating JS on the fly and circumventing App Store part. Obviously (facepalm) ... ️

What specifically is not allowed? Microsoft provide CodePush as a service which allows you to push updated JavaScript bundles to Android and iOS apps.

Re: Ask HN: Best language to share code between an Android and iOS app?

#19
post #10

Just use JavaScript. Javascriptcore is a lightweight way to execute JavaScript on iOS and you can use V8 context or duktape on Android. This way you can also update code in your app without an app store update.

which is not allowed on iOS ... Edit: Sorry for being unclear, was only referring to the updating JS on the fly and circumventing App Store part. Obviously (facepalm) ... ️

It is totally allowed on iOS.

Perhaps your thinking about downloading such JS code at runtime from your servers, thus escaping Apple's control on the app, which was indeed forbidden (it is now ok as long as you don't drastically change the app)

Bundling JS in the app and running it has always been just fine.

Post reply on HN