Re: Would you expect to see a warning about things that aren't supported in the deployment target OS?
Re: Would you expect to see a warning about things that aren't supported in the deployment target OS?
- Subject: Re: Would you expect to see a warning about things that aren't supported in the deployment target OS?
- From: Fritz Anderson <email@hidden>
- Date: Wed, 18 Apr 2012 09:12:54 -0500
On 17 Apr 2012, at 7:40 PM, G S wrote: Thanks for your thorough response, Fritz. What you did set was the deployment target, "the minimum version you're going to run on." The resulting binary will run on the OS you target. You can still use the features of a later SDK, but what's in the SDK-minus-target is "weak linked:" The symbols aren't required to exist for your app to load, you can test whether they are available, and you won't crash unless you actually use a symbol that's not available at run time.
Yep. Now I'll have put tests in to check the OS version and post an update.
That's the second-best approach. Better is to ask the system whether it implements the specific API you're about to use. Check for whether classes and function pointers are nil, and whether objects respond to a selector you use (typed in mail):
NSClassFromString(@"AniOS5Class") != nil NSiOS5OnlyFunction != NULL [myPossiblyEnhancedObject respondsToSelector: @selector(newMethod:withiOS5:)] [[NSPossiblyEnhancedClass class] respondsToSelector: @selector(newClassMethod:withiOS5:)]
— F
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden