开发者

iphone sdk 3.0 problem?

开发者 https://www.devze.com 2023-01-23 19:09 出处:网络
i have installed iphone sdk 4.0. but i could not view previous versions 3.0 like that?how can i bring that?suppose If Iusesome开发者_运维技巧 features which are in only 4.0, if user intalls the app in

i have installed iphone sdk 4.0. but i could not view previous versions 3.0 like that?how can i bring that?suppose If I use some开发者_运维技巧 features which are in only 4.0, if user intalls the app in iphone 3.0, will it run?


You can set a base SDK of 4.0 and a deploy target of 3.0.

Base SDK 3.0 to SDK 4.0

The 'Base SDK' is just the version of the SDK that you are compiling against. So you can use any classes, properties, or methods in the Base SDK.

The Deployment Version is earliest version of the OS that you want users to be able to run your code against. If you use a feature available in the Base SDK version but not in the Deployment version then your code will launch on both versions but will crash on the earlier OS version when you use the new feature, so you need to check if the new feature is present if you want to do this.

So you don't need Base SDK of 3.0 to run on 3.0 - just set Base SDK to 4.0 and Deployment Version to 3.0 and don't use any features of the SDK that weren't present beyond 3.0.

http://iosdevelopertips.com/xcode/base-sdk-and-iphone-os-deployment-target-developing-apps-with-the-4-x-sdk-deploying-to-3-x-devices.html

Check for Feature Availability Not OS Version

When targeting an earlier OS as mentioned above, yet you want to take advantage of features of a later OS for devices that support it, you can use the method respondsToSelector to check if the receiver implements or inherits a method that can respond to a specified message. This approach follows Apple’s recommendation to check for availability of features versus a specific OS version.

0

精彩评论

暂无评论...
验证码 换一张
取 消