开发者

Xcode Base SDK: What is the easiest way to install multiple SDK versions side by side

开发者 https://www.devze.com 2023-04-01 21:01 出处:网络
Alright what I noticed is that when I am developing against iOS 4.3, and I set my deployment target as iOS 4.1, I DO NOT get any kind of warning from the IDE about calls which are not supported in the

Alright what I noticed is that when I am developing against iOS 4.3, and I set my deployment target as iOS 4.1, I DO NOT get any kind of warning from the IDE about calls which are not supported in the minimum deployment target.

For example, calling [CLLocationManager authorizationStatus] shows no warning, despite the fact that the documentation for authorizationStatus says it was implemented in iOS 4.2.

I expect this would be a problem when wouldn't it?

From what I understand the solution to this is to download multiple SDK versions, temporarily build against the SDK for your minimum version, but switch to the current SDK version in order to ship.

If there is a better way to do 开发者_开发技巧this please advise. How can I get more options in Xcode under the "Base SDK" setting?


I expect this would be a problem when wouldn't it?

Yes, you'll generally crash if you call a method that doesn't exist.

From what I understand the solution to this is to download multiple SDK versions, temporarily build against the SDK for your minimum version, but switch to the current SDK version in order to ship.

That's a pretty good approach; probably the best way to find this kind of error semi-automatically.

If there is a better way to do this please advise. How can I get more options in Xcode under the "Base SDK" setting?

You don't install all the SDK's together in a single "Developer" folder. Install each one separately -- there's an option to choose an alternate location when you install the SDK. Then it's just a matter of finding the copy of Xcode in the right folder and launching.

You don't need to have multiple options under Base SDK -- the normal practice is to just use the latest, but set the Deployment Target to the minimum version of iOS that your app supports.

0

精彩评论

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

关注公众号