Will Cordova applications that download additional JavaScript be rejected

My team has been toying with the idea of developing an iOS app using Cordova, and recently, we've been looking into offloading as much of the main JavaScript as possible to our server, so any major bug fixes can be deployed quickly.


The idea would be to have:

  1. the native app containing all HTML, CSS, plugins and Cordova files (all native code would be here)
  2. the main JavaScript added to the pages as external scripts from a server
  3. a device-ready function for each page that will set up and start the main JavaScript once it's available


I have seen comments that Apple could be trusting of code that runs in a webview, but it does seem like projects like this could be a security issue.


Thanks!

I've done that once and the app was not rejected.

In the Developer Agreement (maybe section 3.3.2), there is an explicit exception to the prohibition against running downloaded code, allowing JavaScript run inside WebKit or JavascriptCore APIs that doesn't change the basic function of the app as submitted.


But note that Apple has been reported to test apps in AirPlane mode (or on a network with no outside access), and reject those that lock-up waiting for downloads from some server.

>have seen comments that Apple could be trusting of code that runs in a webview


Apple updated the policy which explicitly allows JavascriptCore to download and run javascript and now says this about that...


3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework or JavascriptCore, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.


So if by 'native app' you mean UIWebView (iOS 2.0 and later)/WKWebView (iOS 8.0 and later) or JavascriptCore (iOS 7.0 and later), then you're good to go, I think.

Will Cordova applications that download additional JavaScript be rejected
 
 
Q