Separate names with a comma.
Discussion in 'iOS Programming' started by mikezang, Sep 18, 2012.
I just want to know if I have to build two versions app for both iOS5 and iOS6?
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.
What compile-time error?
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.
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
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.
Just an update from Google on this AdMob SDK for iOS 6 matter:
Hmm. So apps that aren't built for armv7s get black-barred? Even if you have a Default-568h@2x LaunchImageFile?
Thanks, I also got this message, we have to wait...
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