Reputation: 1339
I wast just in the process of finishing an app, then iOS7 was published. I am using Cordova 3.0.
Before I update to XCode 5, compile for iOS7 and nothing is working... I wanted to know if they are working well together?
And are the Cordova plugins (connection, splashscreen, notification, storage) still working or do we have to wait for the Cordova Apache Software Foundation to bring out a new version?
Thank you very much.
Upvotes: 4
Views: 10772
Reputation: 61
If you are getting compilation error after upgrading to iOS 7 and XCode 5 then in this case you need to change your Valid Architecture value under the Build Settings.
change your Architectures value to "armv7" only and delete others after that build you project all the compilation errors will resolve.
This fix will work for the Cordova Application only
Upvotes: 5
Reputation: 490
I'm using cordova 3.0 and xcode 5 too. It seems not any compile error and can run successfully. Problem is iOS7's screen length. Can use below method to solve the screen length problem. (this is also mentioned as a statusbar hide main ui problem)
0, not sure whether the margin-top=20px solution whether work good, because in my environment, I'm also using jquery mobile, so simple set margin-top has no effect.
My solution is:
1, Set View controller-based status bar appearance to NO in info.plist file.
2, Use this code for iOS 7
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
}
Till now, the status bar shows back to like iOS 6 or earlier. But you can find bottom a little hidden under the device scree. To solve this problem,
3, Set all jquery mobile and iscrollview footer element padding-bottom=20px.
onDeviceReady: function() {
console.log("onDeviceReady");
if( parseInt(device.version) >= 7){
$("footer").css("padding-bottom","20px");
}
app.receivedEvent('deviceready');
},
That's all for me to port my Cordova 3.0 + jQuery Mobile + iscrollview app to Xcode 5 + iOS7 . Hope it helpful to you.
Upvotes: 2
Reputation: 1489
I'm using Cordova 2.9 and XCode 5 and are working "almost" perfect, the code compiles and even deploy to the phone.
The only problem I've found are that the status bar now shows over the app, because the new fullscreen mode.
For more info you could see PhoneGap and Cordova with iOS 7
Upvotes: 1
Reputation: 156
I was wondering this myself, so I backed up xcode4 (copied it from the Applications folder to a backup folder) and then updated to xcode5 today. (This might be helpful: Can you install the Xcode 5 Developer Preview in parallel with Xcode 4.6.2?)
My Phonegap application compiled successfully and runs on the iOS7 simulator. So from what I can see, Phonegap 3.0.0 and xcode5 work well together.
Other than that, I believe there are some iOS7 specific configurations that I need to be tweaked, such as:
Upvotes: 3