简体   繁体   中英

Testing a iPhone app in iOS 3.0

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

1) Is there any way to get XCode to highlight any code that was deprecated in a prior OS version?

Xcode does so automatically due to the existence of C macros that signal deprecation, ie:

UIKIT_EXTERN NSString *const UIKeyboardBoundsUserInfoKey        __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_NA,__MAC_NA,__IPHONE_2_0,__IPHONE_3_2);

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?

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:

if (UI_USER_INTERFACE_IDIOM == UIUserInterfaceIdiomPad)

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)

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?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM