简体   繁体   English

在iOS 3.0中测试iPhone应用程序

[英]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. 我有一个在iOS 2.0中运行的程序,现在正在对其进行一些更新。 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. 我认为我没有做过3.0不会提供的任何操作,但是我没有3.0设备可以对其进行测试。 I do know that I updated one deprecated function addTimeInterval to the new version dateByAddingTimeInterval 我确实知道我已将一个不赞成使用的函数addTimeInterval更新为新版本dateByAddingTimeInterval

a few questions - 几个问题 -

1) Is there any way to get XCode to highlight any code that was deprecated in a prior OS version? 1)是否有任何方法可以使XCode突出显示在以前的OS版本中不推荐使用的任何代码?

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? 2)如果将目标设置为3.0,并且可以编译文件,这是否意味着我没有调用3.0无法运行的任何内容?

3) I have an old 3GS that I had upgraded to 4.0. 3)我有一个旧的3GS,我已经升级到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? 有什么方法可以获取3.0或3.1还原文件,以便仅将iPhone降级并将其用作测试平台?

Thanks 谢谢

1) Is there any way to get XCode to highlight any code that was deprecated in a prior OS version? 1)是否有任何方法可以使XCode突出显示在以前的OS版本中不推荐使用的任何代码?

Xcode does so automatically due to the existence of C macros that signal deprecation, ie: 由于存在指示弃用的C宏,因此Xcode自动执行此操作,即:

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? 2)如果将目标设置为3.0,并且可以编译文件,这是否意味着我没有调用3.0无法运行的任何内容?

No, because it's not the Deployment Target that matters here, it's the Base SDK setting that matters. 否,因为与此处无关的部署目标很重要,而是基本SDK设置很重要。 For example, if you set your Base SDK to 4.1 and Deployment Target to 3.1.3, and then compile the following code: 例如,如果将基本SDK设置为4.1,将部署目标设置为3.1.3,然后编译以下代码:

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.1.3设备上运行时错误(实际上,任何运行<3.2的设备)

3) I have an old 3GS that I had upgraded to 4.0. 3)我有一个旧的3GS,我已经升级到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? 有什么方法可以获取3.0或3.1还原文件,以便仅将iPhone降级并将其用作测试平台?

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). 无法在iPhone上回滚固件(尽管我读过可以在iPod Touch上回滚固件,但我没有尝试过)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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