• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Would you expect to see a warning about things that aren't supported in the deployment target OS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Would you expect to see a warning about things that aren't supported in the deployment target OS? (From: G S <email@hidden>)
 >Re: Would you expect to see a warning about things that aren't supported in the deployment target OS? (From: Fritz Anderson <email@hidden>)
 >Re: Would you expect to see a warning about things that aren't supported in the deployment target OS? (From: G S <email@hidden>)

  • Prev by Date: Re: Macro to output an NSString containing function name, line number plus a string with a variable number of arguments?
  • Next by Date: Re: Have not Agvtool
  • Previous by thread: Re: Would you expect to see a warning about things that aren't supported in the deployment target OS?
  • Next by thread: Re: Would you expect to see a warning about things that aren't supported in the deployment target OS?
  • Index(es):
    • Date
    • Thread