Here are a few tips when you are ready to upgrade your existing Cordova App to iOS 8. I migrated my Cordova 3.3.0 app this morning successfully following these instructions.
Step 1
Run npm install to upgrade Cordova to the latest with the following sequence of commands:
npm install -g cordova cd my_project cordova platform update android
Step 2
Update your project’s “Build Settings” for the target as follows:
- Build Active Architecture Only: “Yes”
- Valid Architectures: “arm64 armv7″
Step 3
If you’re updating an older version of Cordova, you will need to comment out or remove these lines from the “MainViewController.m” class:
- (BOOL)execute:(CDVInvokedUrlCommand*)command { return [super execute:command]; }
Step 4 (optional)
If you need to have your WebView adjust the top 20px to account for the iOS 7/8 status bar, install the following plugin and update your config.xml accordingly. I have mine set as follows:
<feature name="StatusBar"> <param name="ios-package" onload="true" value="CDVStatusBar" /> </feature> <preference name="StatusBarOverlaysWebView" value="false" /> <preference name="StatusBarStyle" value="lightcontent" /> <preference name="StatusBarBackgroundColor" value="#000000" />
Shazron’s blog goes into more details on a few other essential plugins here.
