• 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: How to get warnings for missing methods in older SDKs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get warnings for missing methods in older SDKs


  • Subject: Re: How to get warnings for missing methods in older SDKs
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 27 Mar 2011 12:17:28 -0400

On Sun, Mar 27, 2011 at 8:12 AM, Alexander von Below <email@hidden> wrote:
>
> Am 27.03.2011 um 13:21 schrieb Christiaan Hofman:
>
>> I am not saying that it would not be nice to know whether you've used new API in an unsafe manner, but I see no way how the compiler can know about that, and therefore warn about it. I don't want to have loads of warnings about correct use of API.
>
> Easy:
>
> NS_CLASS_AVAILABLE(NA, 4_0)
> @interface CLRegion : NSObject <NSCopying, NSCoding>
> {
> ...
> }
>
> - (id)initCircularRegionWithCenter:(CLLocationCoordinate2D)center
>                            radius:(CLLocationDistance)radius
>                        identifier:(NSString *)identifier __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
>
>
> etc.
>
> The SDK has absolutely clear, machine readable hints about when something is available.

Yes! Such warnings could be silenced by wrapping such methods in a "if
([target respondsToSelector:...])" block, where the checked selector
has the same availability.

sherm--

--
Cocoa programming in Perl:
http://camelbones.sourceforge.net
 _______________________________________________
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: 
 >How to get warnings for missing methods in older SDKs (From: Ben Staveley-Taylor <email@hidden>)
 >Re: How to get warnings for missing methods in older SDKs (From: Chris Suter <email@hidden>)
 >Re: How to get warnings for missing methods in older SDKs (From: Ben Staveley-Taylor <email@hidden>)
 >Re: How to get warnings for missing methods in older SDKs (From: Chris Suter <email@hidden>)
 >Re: How to get warnings for missing methods in older SDKs (From: Ben Staveley-Taylor <email@hidden>)
 >Re: How to get warnings for missing methods in older SDKs (From: Christiaan Hofman <email@hidden>)
 >Re: How to get warnings for missing methods in older SDKs (From: Alexander von Below <email@hidden>)

  • Prev by Date: Re: Xcode 4 ate my keyboard!
  • Next by Date: XCode 4 - Thank You!!
  • Previous by thread: Re: How to get warnings for missing methods in older SDKs
  • Next by thread: Re: How to get warnings for missing methods in older SDKs
  • Index(es):
    • Date
    • Thread