简体   繁体   中英

Apple Store Guidelines. External JavaScript files in hybrid mobile application

Will hybrid application that is developed using Cordova pass review for publishing in Apple Store if core functionality (AngularJS application initialization, controllers, services) gets from outside source and not included in the project?

index.html file will looks like:

<!DOCTYPE html>
<html>    
<head>
    <base href="http://test.com:8080/" />        
    <title>Application</title>
    <link href="app.css" rel="stylesheet" />
    <script type="text/javascript" src="file:///android_asset/www/js/jsLib.js"></script>
    <script type="text/javascript" src="js/jsApp.js"></script>
</head>

<body>
    <div ng-app="app"></div>
</body>

</html>

Will it pass criteria in App Store Review Guidelines ?

2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other iOS, watchOS, macOS, or tvOS apps.

This is a section from the iOS developer Agreement.

3.3.2 Except as set forth in the next paragraph, 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 exceptions to the foregoing are 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.

As long as you meet this criteria you should be fine.

Also see my answer here, in it I mention about being able to use basic functionality if no network is available.

https://stackoverflow.com/a/43504441/7837081

No It's not a problem because Cordova just provides you a WebView and your code just runs inside that webview. The content that runs on webview can be bundled within the app (www directory) or can be hosted somewhere and then you can run it on the webview. The only concern will be the performance of the app will be slow if javascript logic is downloaded and then run on the app instead of bundling it in the app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM