Building for lower version number for iPhone distribution
If I have built an app for 3.1.3 (using for instance the frameworks within the 3.1.3 folders) how do i then target a version bel开发者_如何转开发ow that (3.1.2) for the ad hoc and distribution builds?
Do change the Base SDK in the Project Info (Distribution) settings or the Target Info (Distribution) settings? (I've always been unclear on the diff between these two windows)
Base SDK must be 4.0 (or 3.2 for iPad). You don't get any other choice with the new SDK.
Therefore it is the "iPhone OS target" value you must change, found within the project settings. Here you can wind right back to OS2.0 if you wanted!
When you do this and set any earlier version than 4.0/3.2, any new calls for the later versions will be loosely bound; in other words, it will run on the old OS but will crash if any new calls are executed. Therefore you need to check if newer calls are supported. Use the -respondsToSelector method, or alternatively check UIDevice to see what OS version is currently running.
Edit: if you're using Xcode 3.2.2 or earlier then you get a wider choice of Base SDK. If you set a lower base SDK then any new commands won't be available/won't compile. This can be useful for example if you want to guarantee an app running in iPhone OS3.0. However this option disappears for historic OS numbers in Xcode 3.2.3 as mentioned above.
精彩评论