tags:

views:

45

answers:

2

Suppose I have my project using Base SDK = 4 but set the Target OS to 3.

Now suppose that I may have used some functionality that belongs to 4, on a framework that already exists on 3.0. So, it is not a matter of using a framework that doesn't exist on 3, it is a matter of using a method that exists on 4 but not on the same framework on 3.

Is there a way to check which lines of my code are illegal on the target OS?

I ask this because when I set Base SDK to 4, Xcode will allow me to use instructions that belong to 4.0, even if the target OS is 3. This will simply make iPhone 3GS crash and will not be detected during compilation.

thanks

+2  A: 

As far as I know there's no way of doing this from the newest Xcode.

You can install a previous version with the iPhone 3.0 SDK, build the project and check the compiler warnings. This method is not foolproof as it doesn't cover all possible cases.

And I highly recommend that you test your app in a iPhone 3.X device anyway. Some APIs behave differently, even if their signature hasn't changed.

hgpc
thanks, but look at this other question of mine: http://stackoverflow.com/questions/3248729/iphone-xcode-3-2-3-refusing-to-run-simulator-3-1-3Xcode is refusing to run the code on a 3.1.3 device, if I set base SDK to 4 and target OS to 3....
Digital Robot
+1  A: 

Cocoa with Love has a good roundup of working with older OSes. I think this might answer your question:

http://cocoawithlove.com/2010/07/tips-tricks-for-conditional-ios3-ios32.html

ChadHydro