1

I am looking at this WWDC session: Integrating JavaScript into Native Apps

My understanding is that this is a bridge between Obj-C and javascript, that allows calling javascript code from Obj-C and vice versa. I am wondering, does this mean I can dynamically load my 'code logic' from server in javascript, like in web applications? How should I structure my code so that a large part of my code is in javascript (Obj-C is still needed to drive the js code, of course).

If this is feasible, then deploying changes to iOS projects would no longer be such a painful experience(waiting for review and user upgrade,etc), development could be more agile. I know some teams use phonegap and similar frameworks just to get this advantage, but those solutions doesn't get the most of iOS native UI widgets/features.

If both data and logic can be loaded from server, and the Obj-c part is just the (relatively) stable skeleton code, then iOS apps become web apps without HTML (consider the app a customized web browser which loads code and data from server).

So my question is: how feasible is this? How should I split the code between Obj-C and js to make this as flexible as possible?

NeoWang
  • 17,361
  • 24
  • 78
  • 126

1 Answers1

2

As per Appstore Review Guidelines "Apps that download code in any way or form will be rejected"

Praveen Matanam
  • 2,773
  • 1
  • 20
  • 24
  • These rules are not carved in stones. It is very possible for Apple to embrace agile development/continuous deployment for iOS apps in the near future, developers have always cried for this. And, what is the use of JavascriptCore in iOS, if not to load code dynamically? – NeoWang Nov 13 '13 at 09:13
  • 1
    The review guidlines have changed and now permit javascript to be downloaded so long as it does alter the primary purpose of the app or provide functionalities that are contrary to the advertised purpose of the app. [check this out](https://medium.com/@clayallsopp/a-dynamic-crazy-native-mobile-future-powered-by-javascript-70f2d56b1987#.4grbpsegj) – sigvaria Jan 11 '16 at 21:35