Compiling an iphone app under different iOS SDK
I have xcode 4 with base SDK 4.3. I set the deployment target to 3.0. While 开发者_如何学Cmy app runs beautifully with the 4.3 base SDK how would I compile it against an older version, primarily the 3.x SDK? I cannot find a download link that provides that SDK. On Apple's dev site the link to download xcode 3 is only bundled with the latest, 4.3, iOS SDK. I do not have a real device with 3.0 either. My assumption is that the only way to verify compatibility in 3.x is to compile against its SDK (3.x).
Thanks
Edit: Getting 3.x SDK running in xcode with 4.x SDK - http://0xced.blogspot.com/2010/07/using-sdk-313-with-iphone-sdk-4.html
You should not compile it with a lower SDK, just settings to deployment target to 3.0 will allow you app to run on a device running 3.*. The simulator will only get you so far and that your app compiles does not mean that it will run.
Try to get you hands on a old first gen iPhone or iPod touch, they are great for development.
If you do use an update version of the SDK make sure that you don't call any method/classes that aren't available in lower system versions.
this is not an exact answer, however I had your same problem, what I did was to run the app on iPad 3.2 simulator. I have xcode Version 4.0.1 and it has iPad 3.2 simulator. HOWEVER, the problem is that it will still compile (at least mine compiles) but when the app runs, it gives out SIGABRT when it encounters a selector which does not exist in the previous SDK. One of the methods is self.window.rootViewController
which is only found in iOS4 and above.
精彩评论