Search code examples
cocoamethodsavailability

cocoa method strange availability


For example:

class NSNotificationCenter

method deaultCenter

xcode 8.0

OS 10.12

availability macOS (10.12 and later)

BUT

xcode 5.1.1

OS 10.8

availability OS X v10.0 and later

Why? Can I use "deaultCenter" in OS 10.8? And how can I know that some methods have the real "macOS (10.12 and later)" (crash in early OS version) availability?


Solution

  • The current online copy of the defaultCenter documentation correctly says 10.0+. If Xcode 8 is not agreeing then it's a documentation bug. You can file a report at bugreport.apple.com