10.13 SDK: [CBPeripheral identifier] incorrectly marked as being available 10.13+ only, when it's really 10.10+
Originator: | thakis | ||
Number: | rdar://33375690 | Date Originated: | 2017 Jul 17 |
Status: | new | Resolved: | |
Product: | macOS + SDK | Product Version: | |
Classification: | Reproducible: |
Summary: CBPeripheral has had an "-identifier" method since 10.10. Looks like CBPeripheral grew a base class CBPeer in 10.13, and -identifier moved to the base class. The base class's -identifier is now marked 10.13+, which I suppose makes sense, but calls to CBPeripheral's -identifier are now 10.13+ in the SDK, while CBPeripheral's -identifier really exists since 10.10. In Chrome, we have code like NSUUID *GetId(CBPeripheral* p) { if (@available(macos 10.10, *)) { return [p identifier]; } return nil; } This now incorrectly emits a -Wunguarded-availability warning with the 10.13 SDK. Steps to Reproduce: (see summary) Expected Results: Snippet in summary should compile without issues. Observed Results: Needless -Wunguarded-availability warning is emitted Version: Xcode 9 beta / macOS 10.13 SDK
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!