diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index 75732f941892a1..2105bec3b20545 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -486,7 +486,7 @@ - (void)onPairingComplete:(NSError * _Nullable)error } else { MTRDeviceController * controller = InitializeMTR(); uint64_t deviceId = MTRGetLastPairedDeviceId(); - MTRBaseDevice *device = [controller deviceBeingCommissionedWithNodeID:@(deviceId) error:NULL]; + MTRBaseDevice * device = [controller deviceBeingCommissionedWithNodeID:@(deviceId) error:NULL]; if (device.sessionTransportType == MTRTransportTypeBLE) { dispatch_async(dispatch_get_main_queue(), ^{ [self->_deviceList refreshDeviceList]; diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index a0abbf53e6df82..c93a7e48b002d4 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -127,7 +127,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) { MTRTransportTypeUDP, MTRTransportTypeBLE, MTRTransportTypeTCP, -}; +} MTR_NEWLY_AVAILABLE; @interface MTRBaseDevice : NSObject @@ -146,7 +146,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) { * The transport used by the current session with this device, or * `MTRTransportTypeUndefined` if no session is currently active. */ -@property (readonly) MTRTransportType sessionTransportType; +@property (readonly) MTRTransportType sessionTransportType MTR_NEWLY_AVAILABLE; /** * Subscribe to receive attribute reports for everything (all endpoints, all diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index 5bf953a9eab58c..9e943d2327b690 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -27,11 +27,12 @@ NS_ASSUME_NONNULL_BEGIN -static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type) { - static_assert(MTRTransportTypeUndefined == (uint8_t)chip::Transport::Type::kUndefined, "MTRTransportType != Transport::Type"); - static_assert(MTRTransportTypeUDP == (uint8_t)chip::Transport::Type::kUdp, "MTRTransportType != Transport::Type"); - static_assert(MTRTransportTypeBLE == (uint8_t)chip::Transport::Type::kBle, "MTRTransportType != Transport::Type"); - static_assert(MTRTransportTypeTCP == (uint8_t)chip::Transport::Type::kTcp, "MTRTransportType != Transport::Type"); +static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type) +{ + static_assert(MTRTransportTypeUndefined == (uint8_t) chip::Transport::Type::kUndefined, "MTRTransportType != Transport::Type"); + static_assert(MTRTransportTypeUDP == (uint8_t) chip::Transport::Type::kUdp, "MTRTransportType != Transport::Type"); + static_assert(MTRTransportTypeBLE == (uint8_t) chip::Transport::Type::kBle, "MTRTransportType != Transport::Type"); + static_assert(MTRTransportTypeTCP == (uint8_t) chip::Transport::Type::kTcp, "MTRTransportType != Transport::Type"); return static_cast(type); } @@ -63,9 +64,6 @@ static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type) */ @property (nonatomic, assign, readonly) chip::NodeId nodeID; -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - /** * Initialize the device object as a CASE device with the given node id and * controller. This will always succeed, even if there is no such node id on