diff options
Diffstat (limited to 'src/bluetooth/osx/osxbtutility_p.h')
-rw-r--r-- | src/bluetooth/osx/osxbtutility_p.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtutility_p.h b/src/bluetooth/osx/osxbtutility_p.h index 148ebc0b..5d90a54e 100644 --- a/src/bluetooth/osx/osxbtutility_p.h +++ b/src/bluetooth/osx/osxbtutility_p.h @@ -313,4 +313,23 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT_OSX) QT_END_NAMESPACE +#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(101300) && QT_MACOS_DEPLOYMENT_TARGET_BELOW(101300) + + // In the macOS 10.13 SDK, the identifier property was moved from the CBPeripheral + // and CBCentral classes to a new CBPeer base class. Because CBPeer is only available + // on macOS 10.13 and above, the same is true for -[CBPeer identifier]. However, + // since we know that the derived classes have always had this property, + // we'll explicitly mark its availability here. This will not adversely affect + // using the identifier through the CBPeer base class, which will still require macOS 10.13. + +@interface CBPeripheral (UnguardedWorkaround) +@property (readonly, nonatomic) NSUUID *identifier NS_AVAILABLE(10_7, 5_0); +@end + +@interface CBCentral (UnguardedWorkaround) +@property (readonly, nonatomic) NSUUID *identifier NS_AVAILABLE(10_7, 5_0); +@end + +#endif + #endif |