4

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.

zk_mars
  • 1,339
  • 2
  • 15
  • 36

4 Answers4

5

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

3

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:

  • different icon sizes for retina displays in iOS7
  • adding icons for spotlight and settings
Community
  • 1
  • 1
Kendolein
  • 156
  • 1
  • 4
2

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.

Solomon
  • 492
  • 1
  • 3
  • 13
  • @soloman ..the step 2 self.window.frame = CGRectMake(0,20,self ...is working perfectly thanks for that, but the step 3 is having no effect, its entering the if condition for sure, but the footer is still hidden, any idea?? iam using cordova 2.7 – Bonnie Oct 25 '13 at 06:04
  • @Bonnie Hi Bonnie, This may related with 1)jqm version which provides basic styles for footer, 2)whether you are using iscrollview which may affect footer positioning behavior, 3)whether the css"padding-bottom" applied properly. I think you can try apply $("footer").css("padding-bottom","20px") some more places instead of in onDeviceReady only, if can have any effect, then can confirm the problem of not applied properly, then can have a more clear vision to debug on. – Solomon Oct 28 '13 at 09:27
1

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

Carlos487
  • 1,459
  • 13
  • 17