• 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: SCNetworkReachability and impact of Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCNetworkReachability and impact of Snow Leopard


  • Subject: Re: SCNetworkReachability and impact of Snow Leopard
  • From: Kevin Elliott <email@hidden>
  • Date: Tue, 01 Sep 2009 14:37:05 -0700


On Aug 30, 2009, at 5:11 AM, Stuart Malin wrote:

I am writing some code on 10.5 Leopard that uses SCNetworkReachability. The latest documentation (SysConfig.pdf dated 2009-07-30) shows the Network Reachability Flags (with names such as kSCNetworkReachabilityFlagsReachable) as being declared in SCNetworkReachability.h as of 10.6.


However, on 10.5, the flags (appear to me) to be defined in SCNetwork.h, and have names like kSCNetworkFlagsReachable.

Question: What is the best way for me to write code now that will be compliant with 10.6 Snow Leopard? Should I conditionally compile and test against different flags? Or just keep using the SCNetwork.h enum values until and unless I need one of the newly-defined-in-10.6 values?

The new names were introduced for iPhoneOS and then moved back to OS X. On the iPhone, all of SystemConfiguration except Reachability is private, so the new names make a bit more sense. If you look at the actual values those enums define, you'll see that the values are identical to maintain binary compatibility between Leopard and SnowLeopard. The up shot is it doesn't matter which values you use, as they compile down to identical code. I'd stick with the old values to simplify building for/on Leopard.


-Kevin Elliott
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: saving files/folders in foreign language names
  • Next by Date: Re: Finder-style sorting and the SQL Core Data store, best practice?
  • Previous by thread: Re: saving files/folders in foreign language names
  • Next by thread: Changes in KVO behavior on SL?
  • Index(es):
    • Date
    • Thread