PDA

View Full Version : Do two version apps need for iOS5 and iOS6?




mikezang
Sep 18, 2012, 05:46 AM
I just want to know if I have to build two versions app for both iOS5 and iOS6?



jnoxx
Sep 18, 2012, 08:33 AM
Nope, you have to check in code on what device you are, and make your code depend on that..

mikezang
Sep 18, 2012, 08:44 AM
Nope, you have to check in code on what device you are, and make your code depend on that..
Sorry, maybe I did't talk clear, I want to say even if I do not use iOS6 new features, i can compile for iOS6 Simulator, but when I try to compile for my iPad with iOS5, I got compile error, so that I ask this Q.

dejo
Sep 18, 2012, 09:07 AM
...but when I try to compile for my iPad with iOS5, I got compile error...

What compile-time error?

Duncan C
Sep 18, 2012, 09:22 AM
I just want to know if I have to build two versions app for both iOS5 and iOS6?

No. You want to set up your project with the "Base SDK" set to 6.0. That will enable you to build iOS 6.0 features into your app.

Then you want to set the "deployment target" to 5.0, or the lowest iOS version that you want to support.

Finally, for features that are only available in 6.0, you need to add runtime code that checks to see if the feature is available and only calls new OS frameworks and methods if they are available. This last part is the tricky part.

Note that if you're not doing anything iOS 6 specific, you can simply set your base SDK to 5.0. Then you'll build an app that will run on iOS 5 or higher, but will only support features that are available in iOS 5.

mikezang
Sep 18, 2012, 09:37 AM
What compile-time error?
ld: file is universal (3 slices) but does not contain a(n) armv7s slice:

dejo
Sep 18, 2012, 11:07 AM
ld: file is universal (3 slices) but does not contain a(n) armv7s slice:

Sounds like the compile-time error I get from my AdMob library. I believe you'll need to wait for Google to update their libGoogleAdMobAds.a

xStep
Sep 18, 2012, 06:06 PM
Sounds like the compile-time error I get from my AdMob library. I believe you'll need to wait for Google to update their libGoogleAdMobAds.a

No. Just set your Architectures entry for the Build Settings to armv7. When your libraries catch up you can set the value back to "Standard (armv7, armv7s)".

If you build you own libraries, then you should be able to recompile them now. It's those third party libraries that people are forced to work around.

The armv7s should run previous code just fine, otherwise a lot of apps would out right break on iOS 6. Not that there aren't other potential issues. :eek:

dejo
Sep 19, 2012, 09:58 AM
Just an update from Google on this AdMob SDK for iOS 6 matter:

We've recently received questions about iOS6 compatibility with the Google AdMob SDK.

The latest iOS AdMob SDK's (6.1.4 and 6.1.5) should work fine on an iPhone 5 with iOS 6 if you aren't compiling for the armv7s architecture. Your application will just run with black bars at the top and bottom of your application in this case.

For developers looking to utilize the entire screen of the iPhone 5, we will be releasing a binary that supports the armv7s architecture in the coming days. This is a high prioirty for us and we'll update this forum with details soon.

https://groups.google.com/forum/?fromgroups=#!topic/google-admob-ads-sdk/9Wub-gh9rf8

Reason077
Sep 19, 2012, 10:17 AM
The latest iOS AdMob SDK's (6.1.4 and 6.1.5) should work fine on an iPhone 5 with iOS 6 if you aren't compiling for the armv7s architecture. Your application will just run with black bars at the top and bottom of your application in this case.

Hmm. So apps that aren't built for armv7s get black-barred? Even if you have a Default-568h@2x LaunchImageFile?

mikezang
Sep 19, 2012, 10:17 AM
Just an update from Google on this AdMob SDK for iOS 6 matter:
https://groups.google.com/forum/?fromgroups=#!topic/google-admob-ads-sdk/9Wub-gh9rf8
Thanks, I also got this message, we have to wait...

dejo
Sep 19, 2012, 10:26 AM
Hmm. So apps that aren't built for armv7s get black-barred? Even if you have a Default-568h@2x LaunchImageFile?

No, I'm pretty sure if you have the Default-568h@2x image, you won't get letterboxed. I believe this is how the detection is being done. Seems a little wonky to base this on the presence of a specifically-named image (universal apps don't work like this), so hopefully Apple will come up with a better method in the future.

GenesisST
Sep 19, 2012, 03:25 PM
No, I'm pretty sure if you have the Default-568h@2x image, you won't get letterboxed. I believe this is how the detection is being done. Seems a little wonky to base this on the presence of a specifically-named image (universal apps don't work like this), so hopefully Apple will come up with a better method in the future.

This was the result of my investigation as well