Skip to content

Commit a386c83

Browse files
Darwin: Re-enable TAPI and change symbol visibility management (project-chip#31166)
* Darwin: Re-enable TAPI and change symbol visibility management Symbols are now hidden by default, but anything annotated with API availability (or deprecation, since that implies previous availability) is exported. Also add missing API availability to a number of classes that were introduced in the initial release. * Remove MTR_HIDDEN to avoid duplicate visibility attributes * Comment tweak * Re-add missing MTR_EXTERN * Make MTR_PER_CONTROLLER_STORAGE_ENABLED=0 work * restyle * Build MatterTests and dft with MTR_NO_AVAILABILITY=1
1 parent 8830ec1 commit a386c83

33 files changed

+174
-159
lines changed

src/darwin/Framework/CHIP/MTRBaseDevice.h

+38-28
Original file line numberDiff line numberDiff line change
@@ -121,30 +121,30 @@ typedef void (^MTRDeviceResubscriptionScheduledHandler)(NSError * error, NSNumbe
121121
MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
122122
typedef void (^MTRDeviceOpenCommissioningWindowHandler)(MTRSetupPayload * _Nullable payload, NSError * _Nullable error);
123123

124-
extern NSString * const MTRAttributePathKey;
125-
extern NSString * const MTRCommandPathKey;
126-
extern NSString * const MTREventPathKey;
127-
extern NSString * const MTRDataKey;
128-
extern NSString * const MTRErrorKey;
129-
extern NSString * const MTRTypeKey;
130-
extern NSString * const MTRValueKey;
131-
extern NSString * const MTRContextTagKey;
132-
extern NSString * const MTRSignedIntegerValueType;
133-
extern NSString * const MTRUnsignedIntegerValueType;
134-
extern NSString * const MTRBooleanValueType;
135-
extern NSString * const MTRUTF8StringValueType;
136-
extern NSString * const MTROctetStringValueType;
137-
extern NSString * const MTRFloatValueType;
138-
extern NSString * const MTRDoubleValueType;
139-
extern NSString * const MTRNullValueType;
140-
extern NSString * const MTRStructureValueType;
141-
extern NSString * const MTRArrayValueType;
142-
extern NSString * const MTREventNumberKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
143-
extern NSString * const MTREventPriorityKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
144-
extern NSString * const MTREventTimeTypeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
145-
extern NSString * const MTREventSystemUpTimeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
146-
extern NSString * const MTREventTimestampDateKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
147-
extern NSString * const MTREventIsHistoricalKey MTR_AVAILABLE(ios(17.3), macos(14.3), watchos(10.3), tvos(17.3));
124+
MTR_EXTERN NSString * const MTRAttributePathKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
125+
MTR_EXTERN NSString * const MTRCommandPathKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
126+
MTR_EXTERN NSString * const MTREventPathKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
127+
MTR_EXTERN NSString * const MTRDataKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
128+
MTR_EXTERN NSString * const MTRErrorKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
129+
MTR_EXTERN NSString * const MTRTypeKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
130+
MTR_EXTERN NSString * const MTRValueKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
131+
MTR_EXTERN NSString * const MTRContextTagKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
132+
MTR_EXTERN NSString * const MTRSignedIntegerValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
133+
MTR_EXTERN NSString * const MTRUnsignedIntegerValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
134+
MTR_EXTERN NSString * const MTRBooleanValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
135+
MTR_EXTERN NSString * const MTRUTF8StringValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
136+
MTR_EXTERN NSString * const MTROctetStringValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
137+
MTR_EXTERN NSString * const MTRFloatValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
138+
MTR_EXTERN NSString * const MTRDoubleValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
139+
MTR_EXTERN NSString * const MTRNullValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
140+
MTR_EXTERN NSString * const MTRStructureValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
141+
MTR_EXTERN NSString * const MTRArrayValueType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
142+
MTR_EXTERN NSString * const MTREventNumberKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
143+
MTR_EXTERN NSString * const MTREventPriorityKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
144+
MTR_EXTERN NSString * const MTREventTimeTypeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
145+
MTR_EXTERN NSString * const MTREventSystemUpTimeKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
146+
MTR_EXTERN NSString * const MTREventTimestampDateKey MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
147+
MTR_EXTERN NSString * const MTREventIsHistoricalKey MTR_AVAILABLE(ios(17.3), macos(14.3), watchos(10.3), tvos(17.3));
148148

149149
@class MTRClusterStateCacheContainer;
150150
@class MTRAttributeCacheContainer;
@@ -165,8 +165,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) {
165165
*/
166166
MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
167167
@interface MTRAttributeRequestPath : NSObject <NSCopying>
168-
@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
169-
;
168+
@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
170169
@property (nonatomic, readonly, copy, nullable) NSNumber * cluster MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
171170
@property (nonatomic, readonly, copy, nullable)
172171
NSNumber * attribute MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
@@ -184,8 +183,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
184183
*/
185184
MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
186185
@interface MTREventRequestPath : NSObject <NSCopying>
187-
@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
188-
;
186+
@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
189187
@property (nonatomic, readonly, copy, nullable) NSNumber * cluster MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
190188
@property (nonatomic, readonly, copy, nullable) NSNumber * event MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
191189

@@ -195,6 +193,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
195193
MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
196194
@end
197195

196+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
198197
@interface MTRBaseDevice : NSObject
199198

200199
- (instancetype)init NS_UNAVAILABLE;
@@ -551,6 +550,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
551550
*/
552551
MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
553552
@interface MTRClusterPath : NSObject <NSCopying>
553+
554554
@property (nonatomic, readonly, copy) NSNumber * endpoint;
555555
@property (nonatomic, readonly, copy) NSNumber * cluster;
556556

@@ -564,7 +564,9 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
564564
* A path indicating a specific attribute on a device (i.e. without any
565565
* wildcards).
566566
*/
567+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
567568
@interface MTRAttributePath : MTRClusterPath
569+
568570
@property (nonatomic, readonly, copy) NSNumber * attribute;
569571

570572
+ (MTRAttributePath *)attributePathWithEndpointID:(NSNumber *)endpointID
@@ -578,7 +580,9 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
578580
* (i.e. without any wildcards). There can be multiple instances of actual
579581
* events for a given event path.
580582
*/
583+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
581584
@interface MTREventPath : MTRClusterPath
585+
582586
@property (nonatomic, readonly, copy) NSNumber * event;
583587

584588
+ (MTREventPath *)eventPathWithEndpointID:(NSNumber *)endpointID
@@ -590,15 +594,19 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
590594
* A path indicating a specific command on a device (i.e. without any
591595
* wildcards).
592596
*/
597+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
593598
@interface MTRCommandPath : MTRClusterPath
599+
594600
@property (nonatomic, readonly, copy) NSNumber * command;
595601

596602
+ (MTRCommandPath *)commandPathWithEndpointID:(NSNumber *)endpointID
597603
clusterID:(NSNumber *)clusterID
598604
commandID:(NSNumber *)commandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
599605
@end
600606

607+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
601608
@interface MTRAttributeReport : NSObject
609+
602610
@property (nonatomic, readonly, copy) MTRAttributePath * path;
603611

604612
/**
@@ -665,7 +673,9 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
665673
MTREventPriorityCritical = 2
666674
} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
667675

676+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
668677
@interface MTREventReport : NSObject
678+
669679
@property (nonatomic, readonly, copy) MTREventPath * path;
670680

671681
/**

src/darwin/Framework/CHIP/MTRBaseDevice.mm

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090

9191
class MTRDataValueDictionaryCallbackBridge;
9292

93-
MTR_HIDDEN
9493
@interface MTRReadClientContainer : NSObject
9594
@property (nonatomic, readwrite) app::ReadClient * readClientPtr;
9695
@property (nonatomic, readwrite) app::AttributePathParams * pathParams;

src/darwin/Framework/CHIP/MTRCertificates.h

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
2626

2727
@protocol MTRKeypair;
2828

29+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
2930
@interface MTRCertificates : NSObject
3031

3132
- (instancetype)init NS_UNAVAILABLE;

src/darwin/Framework/CHIP/MTRCluster.h

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
3737
* MTRCluster
3838
* This is the base class for clusters.
3939
*/
40+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
4041
@interface MTRCluster : NSObject
4142
- (instancetype)init NS_UNAVAILABLE;
4243
+ (instancetype)new NS_UNAVAILABLE;
@@ -71,6 +72,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4))
7172
* If not provided (i.e. nil passed for the CHIPWriteParams argument), will be
7273
* treated as if a default-initialized object was passed in.
7374
*/
75+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
7476
@interface MTRWriteParams : NSObject <NSCopying>
7577

7678
/**
@@ -106,6 +108,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4))
106108
* If not provided (i.e. nil passed for the MTRReadParams argument), will be
107109
* treated as if a default-initialized object was passed in.
108110
*/
111+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
109112
@interface MTRReadParams : NSObject <NSCopying>
110113

111114
/**
@@ -137,6 +140,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4))
137140
* provided (i.e. nil passed for the MTRSubscribeParams argument), will be
138141
* treated as if a default-initialized object was passed in.
139142
*/
143+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
140144
@interface MTRSubscribeParams : MTRReadParams
141145

142146
/**

src/darwin/Framework/CHIP/MTRCommandTimedCheck.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#pragma once
19-
20-
#import <Foundation/Foundation.h>
18+
#import <Matter/MTRDefines.h>
2119

2220
NS_ASSUME_NONNULL_BEGIN
2321

src/darwin/Framework/CHIP/MTRCommissionableBrowser.h

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN
2323
@protocol MTRCommissionableBrowserDelegate;
2424
@class MTRDeviceController;
2525

26-
MTR_HIDDEN
2726
@interface MTRCommissionableBrowser : NSObject
2827
- (instancetype)init NS_UNAVAILABLE;
2928
+ (instancetype)new NS_UNAVAILABLE;

src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
NS_ASSUME_NONNULL_BEGIN
2626

27-
MTR_HIDDEN
2827
@interface MTRCommissionableBrowserResultInterfaces : NSObject
2928

3029
@property (nonatomic, readwrite) chip::Optional<chip::Dnssd::CommonResolutionData> resolutionData;

src/darwin/Framework/CHIP/MTRCommissioningParameters.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2525
/**
2626
* Information that can be provided to commissionWithNodeID to commision devices.
2727
*/
28+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
2829
@interface MTRCommissioningParameters : NSObject
2930

3031
/**

src/darwin/Framework/CHIP/MTRDefines.h

+52-32
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,39 @@
1717

1818
#import <Foundation/Foundation.h>
1919

20+
#pragma mark - Overridable options
21+
22+
/**
23+
* @define `MTR_NO_AVAILABILITY`
24+
* Turns off availability annotations, to allow compiling a version of
25+
* Matter.framework for "local use", not as a system framework.
26+
*/
27+
#ifndef MTR_NO_AVAILABILITY
28+
#define MTR_NO_AVAILABILITY 0
29+
#endif
30+
31+
/**
32+
* @define `MTR_ENABLE_PROVISIONAL`
33+
* Makes provisional spec features available for evaluation / testing purposes.
34+
* The usual API / ABI stability guarantees DO NOT APPLY to provisional features.
35+
*/
36+
#ifndef MTR_ENABLE_PROVISIONAL
37+
#define MTR_ENABLE_PROVISIONAL 0
38+
#endif
39+
40+
/**
41+
* @define `MTR_ENABLE_UNSTABLE_API`
42+
* Makes unstbale APIs available for evaluation / testing purposes.
43+
* The usual API / ABI stability guarantees DO NOT APPLY to unstable APIs.
44+
*/
45+
#ifndef MTR_ENABLE_UNSTABLE_API
46+
#define MTR_ENABLE_UNSTABLE_API 0
47+
#endif
48+
2049
#pragma mark - Attribute macros
2150

2251
#define MTR_EXPORT __attribute__((visibility("default")))
2352

24-
#define MTR_HIDDEN __attribute__((visibility("hidden")))
25-
2653
#ifdef __cplusplus
2754
#define MTR_EXTERN extern "C" MTR_EXPORT
2855
#else
@@ -35,51 +62,44 @@
3562
#define MTR_SWIFT_DISFAVORED_OVERLOAD
3663
#endif
3764

38-
#pragma mark - Deprecation macros (can be overriden via build system)
65+
#pragma mark - Availability / deprecation
3966

40-
/**
41-
* MTR_NO_AVAILABILITY can be used to turn off availability
42-
* annotations, to allow compiling a version of Matter.framework for "local
43-
* use", not as a system framework.
44-
*/
45-
#if !defined(MTR_NO_AVAILABILITY)
46-
#define MTR_NO_AVAILABILITY 0
47-
#endif
67+
// clang-format off
68+
#define _MTR_IMPLICIT_EXPORT \
69+
_Pragma("clang diagnostic push") \
70+
_Pragma("clang diagnostic ignored \"-Wignored-attributes\"")\
71+
MTR_EXPORT \
72+
_Pragma("clang diagnostic pop")
73+
// clang-format on
4874

75+
#define _MTR_DEPRECATED _MTR_IMPLICIT_EXPORT MTR_SWIFT_DISFAVORED_OVERLOAD
76+
#define _MTR_UNAVAILABLE _MTR_IMPLICIT_EXPORT NS_UNAVAILABLE
77+
78+
// clang-format off
4979
#if MTR_NO_AVAILABILITY
50-
#define MTR_DEPRECATED(...) MTR_SWIFT_DISFAVORED_OVERLOAD
51-
#define MTR_DEPRECATED_WITH_REPLACEMENT(...) MTR_SWIFT_DISFAVORED_OVERLOAD
52-
#define MTR_AVAILABLE(...)
80+
#define MTR_DEPRECATED(...) _MTR_DEPRECATED
81+
#define MTR_DEPRECATED_WITH_REPLACEMENT(...) _MTR_DEPRECATED
82+
#define MTR_AVAILABLE(...) _MTR_IMPLICIT_EXPORT
5383
#else
54-
#define MTR_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__) MTR_SWIFT_DISFAVORED_OVERLOAD
55-
#define MTR_DEPRECATED_WITH_REPLACEMENT(...) API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__) MTR_SWIFT_DISFAVORED_OVERLOAD
56-
#define MTR_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__)
84+
#define MTR_DEPRECATED(...) _MTR_DEPRECATED API_DEPRECATED(__VA_ARGS__)
85+
#define MTR_DEPRECATED_WITH_REPLACEMENT(...) _MTR_DEPRECATED API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__)
86+
#define MTR_AVAILABLE(...) _MTR_IMPLICIT_EXPORT API_AVAILABLE(__VA_ARGS__)
5787
#endif // MTR_NO_AVAILABILITY
88+
// clang-format on
5889

59-
#define MTR_NEWLY_DEPRECATED(message)
60-
61-
#define MTR_NEWLY_AVAILABLE
62-
63-
#define MTR_UNAVAILABLE NS_UNAVAILABLE MTR_HIDDEN
64-
65-
#if !defined(MTR_ENABLE_PROVISIONAL)
66-
#define MTR_ENABLE_PROVISIONAL 0
67-
#endif
90+
#define MTR_NEWLY_DEPRECATED(message) _MTR_IMPLICIT_EXPORT
91+
#define MTR_NEWLY_AVAILABLE _MTR_IMPLICIT_EXPORT
6892

6993
#if MTR_ENABLE_PROVISIONAL
7094
#define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE
7195
#else
72-
#define MTR_PROVISIONALLY_AVAILABLE MTR_UNAVAILABLE
73-
#endif
74-
75-
#if !defined(MTR_ENABLE_UNSTABLE_API)
76-
#define MTR_ENABLE_UNSTABLE_API 0
96+
#define MTR_PROVISIONALLY_AVAILABLE _MTR_UNAVAILABLE
7797
#endif
7898

7999
#if MTR_ENABLE_UNSTABLE_API
80100
#define MTR_UNSTABLE_API MTR_NEWLY_AVAILABLE
81101
#else
82-
#define MTR_UNSTABLE_API MTR_UNAVAILABLE
102+
#define MTR_UNSTABLE_API _MTR_UNAVAILABLE
83103
#endif
84104

85105
#ifndef MTR_PER_CONTROLLER_STORAGE_ENABLED

src/darwin/Framework/CHIP/MTRDefines_Internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#ifdef DEBUG
3232
#define MTR_TESTABLE MTR_EXPORT
3333
#else
34-
#define MTR_TESTABLE MTR_HIDDEN
34+
#define MTR_TESTABLE
3535
#endif
3636

3737
// clang-format off

src/darwin/Framework/CHIP/MTRDevice.h

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) {
3131

3232
@protocol MTRDeviceDelegate;
3333

34+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
3435
@interface MTRDevice : NSObject
3536
- (instancetype)init NS_UNAVAILABLE;
3637
+ (instancetype)new NS_UNAVAILABLE;

src/darwin/Framework/CHIP/MTRDevice.mm

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
// Consider moving utility classes to their own file
4949
#pragma mark - Utility Classes
5050
// This class is for storing weak references in a container
51-
MTR_HIDDEN
5251
@interface MTRWeakReference<ObjectType> : NSObject
5352
+ (instancetype)weakReferenceWithObject:(ObjectType)object;
5453
- (instancetype)initWithObject:(ObjectType)object;

src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
2424

2525
@class MTRDeviceController;
2626

27+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
2728
@interface MTRDeviceAttestationDeviceInfo : NSObject
2829

2930
- (instancetype)init NS_UNAVAILABLE;
@@ -51,8 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
5152
* used for device attestation. If attestation succeeds, this must match one of
5253
* the product IDs from the certification declaration.
5354
*/
54-
@property (nonatomic, readonly) NSNumber * basicInformationProductID MTR_AVAILABLE(ios(16.6), macos(13.5), watchos(9.6), tvos(16.6))
55-
;
55+
@property (nonatomic, readonly) NSNumber * basicInformationProductID MTR_AVAILABLE(ios(16.6), macos(13.5), watchos(9.6), tvos(16.6));
5656

5757
@property (nonatomic, readonly) MTRCertificateDERBytes dacCertificate;
5858
@property (nonatomic, readonly) MTRCertificateDERBytes dacPAICertificate;

src/darwin/Framework/CHIP/MTRDeviceController.h

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS
3838
@protocol MTRDevicePairingDelegate;
3939
@protocol MTRDeviceControllerDelegate;
4040

41+
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
4142
@interface MTRDeviceController : NSObject
4243

4344
/**

0 commit comments

Comments
 (0)