I have a program that ran in iOS 2.0 and now am making some updates to it. I don’t think I have done anything that won’t be available in 3.0, but I don’t have a 3.0 device around to test it on. I do know that I updated one deprecated function addTimeInterval to the new version dateByAddingTimeInterval
a few questions –
1) Is there any way to get XCode to highlight any code that was deprecated in a prior OS version?
2) If I set the target to 3.0, and it compiles file, does that necessarily mean that I didn’t call anything that 3.0 can’t run?
3) I have an old 3GS that I had upgraded to 4.0. Is there any way I can get a 3.0 or 3.1 restore file so I can just downgrade that iPhone and use it as a testbed?
Thanks
Xcode does so automatically due to the existence of C macros that signal deprecation, i.e.:
No, because it’s not the Deployment Target that matters here, it’s the Base SDK setting that matters. For example, if you set your Base SDK to 4.1 and Deployment Target to 3.1.3, and then compile the following code:
It will compile fine, but it will result in a run-time error on a 3.1.3 device (actually, any device running <3.2)
It is not possible to roll the firmware back on iPhones (although I’ve read that it is possible to rollback firmware on iPod Touches, but I haven’t tried).