Skip to content

Commit 2d6d403

Browse files
Update Darwin availability annotations. (#33405)
1 parent 136357e commit 2d6d403

25 files changed

+2109
-2106
lines changed

src/darwin/Framework/CHIP/MTRBaseDevice.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
564564
timeout:(NSTimeInterval)timeout
565565
queue:(dispatch_queue_t)queue
566566
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion
567-
MTR_NEWLY_AVAILABLE;
567+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
568568

569569
@end
570570

src/darwin/Framework/CHIP/MTRCluster.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
141141
* those consumers is readAttributeWithEndpointID:clusterID:attributeID:params:
142142
* on MTRDevice.
143143
*/
144-
@property (nonatomic, assign, getter=shouldAssumeUnknownAttributesReportable) BOOL assumeUnknownAttributesReportable MTR_NEWLY_AVAILABLE;
144+
@property (nonatomic, assign, getter=shouldAssumeUnknownAttributesReportable) BOOL assumeUnknownAttributesReportable MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
145145

146146
@end
147147

src/darwin/Framework/CHIP/MTRClusterNames.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* For unknown IDs, a string '<Unknown clusterID %d>' will be returned.
3333
*/
34-
MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRClusterNameForID(MTRClusterIDType clusterID);
34+
MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) NSString * MTRClusterNameForID(MTRClusterIDType clusterID);
3535

3636
/**
3737
* Resolve Matter attribute IDs into a descriptive string.
@@ -40,4 +40,4 @@ MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRClusterNameForID(MTRClusterIDType c
4040
* or '<Unknown attributeID %d>' (if the cluster ID is known but the attribute ID is not known)
4141
* will be returned.
4242
*/
43-
MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType attributeID);
43+
MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType attributeID);

src/darwin/Framework/CHIP/MTRDevice.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
7373
* if a subscription has ever been established at any point in the past.
7474
*
7575
*/
76-
@property (readonly) BOOL deviceCachePrimed MTR_NEWLY_AVAILABLE;
76+
@property (readonly) BOOL deviceCachePrimed MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
7777

7878
/**
7979
* The estimated device system start time.
@@ -357,11 +357,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
357357
timeout:(NSTimeInterval)timeout
358358
queue:(dispatch_queue_t)queue
359359
completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion
360-
MTR_NEWLY_AVAILABLE;
360+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
361361
@end
362362

363-
MTR_EXTERN NSString * const MTRPreviousDataKey MTR_NEWLY_AVAILABLE;
364-
MTR_EXTERN NSString * const MTRDataVersionKey MTR_NEWLY_AVAILABLE;
363+
MTR_EXTERN NSString * const MTRPreviousDataKey MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
364+
MTR_EXTERN NSString * const MTRDataVersionKey MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
365365

366366
@protocol MTRDeviceDelegate <NSObject>
367367
@required
@@ -421,15 +421,15 @@ MTR_EXTERN NSString * const MTRDataVersionKey MTR_NEWLY_AVAILABLE;
421421
*
422422
* The intention is that after this is called, the client should be able to call read for mandatory attributes and likely expect non-nil values.
423423
*/
424-
- (void)deviceCachePrimed:(MTRDevice *)device MTR_NEWLY_AVAILABLE;
424+
- (void)deviceCachePrimed:(MTRDevice *)device MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
425425

426426
/**
427427
* This is called when the MTRDevice object detects a change in the device configuration.
428428
*
429429
* Device configuration is the set of functionality implemented by the device.
430430
*
431431
*/
432-
- (void)deviceConfigurationChanged:(MTRDevice *)device MTR_NEWLY_AVAILABLE;
432+
- (void)deviceConfigurationChanged:(MTRDevice *)device MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
433433

434434
@end
435435

src/darwin/Framework/CHIP/MTRDeviceController+XPC.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error)
192192
nodeId:(NSNumber *)nodeId
193193
type:(MTRDiagnosticLogType)type
194194
timeout:(NSTimeInterval)timeout
195-
completion:(void (^)(NSString * _Nullable url, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE;
195+
completion:(void (^)(NSString * _Nullable url, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
196196

197197
@end
198198

src/darwin/Framework/CHIP/MTRDeviceController.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
5858
* on the controller to avoid leaking it.
5959
*/
6060
- (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParameters *)parameters
61-
error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE;
61+
error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
6262

6363
/**
6464
* If true, the controller has not been shut down yet.
@@ -68,7 +68,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
6868
/**
6969
* The ID assigned to this controller at creation time.
7070
*/
71-
@property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_NEWLY_AVAILABLE;
71+
@property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
7272

7373
/**
7474
* Return the Node ID assigned to the controller. Will return nil if the
@@ -178,8 +178,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
178178
error:(NSError * __autoreleasing *)error
179179
MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
180180

181-
- (void)preWarmCommissioningSession MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
182-
MTR_NEWLY_DEPRECATED("-[MTRDeviceControllerFactory preWarmCommissioningSession]");
181+
- (void)preWarmCommissioningSession MTR_DEPRECATED("-[MTRDeviceControllerFactory preWarmCommissioningSession]", ios(16.4, 17.6), macos(13.3, 14.6), watchos(9.4, 10.6), tvos(16.4, 17.6));
183182

184183
/**
185184
* Set the Delegate for the device controller as well as the Queue on which the Delegate callbacks will be triggered
@@ -223,20 +222,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
223222
* 1) There is already an endpoint defined with the given endpoint id.
224223
* 2) There are too many endpoints defined already.
225224
*/
226-
- (BOOL)addServerEndpoint:(MTRServerEndpoint *)endpoint MTR_NEWLY_AVAILABLE;
225+
- (BOOL)addServerEndpoint:(MTRServerEndpoint *)endpoint MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
227226

228227
/**
229228
* Remove the given server endpoint from this controller. If the endpoint is
230229
* not attached to this controller, will just call the completion and do nothing
231230
* else.
232231
*/
233-
- (void)removeServerEndpoint:(MTRServerEndpoint *)endpoint queue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion MTR_NEWLY_AVAILABLE;
232+
- (void)removeServerEndpoint:(MTRServerEndpoint *)endpoint queue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
234233

235234
/**
236235
* Remove the given server endpoint without being notified when the removal
237236
* completes.
238237
*/
239-
- (void)removeServerEndpoint:(MTRServerEndpoint *)endpoint MTR_NEWLY_AVAILABLE;
238+
- (void)removeServerEndpoint:(MTRServerEndpoint *)endpoint MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
240239

241240
/**
242241
* Compute a PASE verifier for the desired setup passcode.

src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
9595
- (void)controller:(MTRDeviceController *)controller
9696
commissioningComplete:(NSError * _Nullable)error
9797
nodeID:(NSNumber * _Nullable)nodeID
98-
metrics:(MTRMetrics *)metrics MTR_NEWLY_AVAILABLE;
98+
metrics:(MTRMetrics *)metrics MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
9999

100100
/**
101101
* Notify the delegate when commissioning infomation has been read from the Basic

src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
187187
* The controller factory must be running for pre-warming to take place. Pre-warming can take place
188188
* before any controllers are started.
189189
*/
190-
- (void)preWarmCommissioningSession MTR_NEWLY_AVAILABLE;
190+
- (void)preWarmCommissioningSession MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
191191

192192
@end
193193

@@ -224,7 +224,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
224224
* the other side requests via its MRP
225225
* parameters.
226226
*/
227-
MTR_EXTERN MTR_NEWLY_AVAILABLE void MTRSetMessageReliabilityParameters(NSNumber * _Nullable idleRetransmitMs,
227+
MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) void MTRSetMessageReliabilityParameters(NSNumber * _Nullable idleRetransmitMs,
228228
NSNumber * _Nullable activeRetransmitMs,
229229
NSNumber * _Nullable activeThresholdMs,
230230
NSNumber * _Nullable additionalRetransmitDelayMs);

src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
2626
* interfaces inheriting from this one should be used to actually do the
2727
* initialization.
2828
*/
29-
MTR_NEWLY_AVAILABLE
29+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
3030
@interface MTRDeviceControllerAbstractParameters : NSObject
3131
- (instancetype)init NS_UNAVAILABLE;
3232
+ (instancetype)new NS_UNAVAILABLE;
@@ -36,7 +36,7 @@ MTR_NEWLY_AVAILABLE
3636
* Parameters that can be used to initialize an MTRDeviceController which
3737
* has a node identity.
3838
*/
39-
MTR_NEWLY_AVAILABLE
39+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
4040
@interface MTRDeviceControllerParameters : MTRDeviceControllerAbstractParameters
4141

4242
/**
@@ -79,7 +79,7 @@ MTR_NEWLY_AVAILABLE
7979

8080
@end
8181

82-
MTR_NEWLY_AVAILABLE
82+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
8383
@interface MTRDeviceControllerExternalCertificateParameters : MTRDeviceControllerParameters
8484

8585
- (instancetype)init NS_UNAVAILABLE;

src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ typedef NS_ENUM(NSUInteger, MTRStorageSecurityLevel) {
2525
MTRStorageSecurityLevelSecure,
2626
// Data may be stored in the clear.
2727
MTRStorageSecurityLevelNotSecure,
28-
} MTR_NEWLY_AVAILABLE;
28+
} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
2929

3030
typedef NS_ENUM(NSUInteger, MTRStorageSharingType) {
3131
// Data must not be shared at all (just store locally).
@@ -42,7 +42,7 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) {
4242

4343
// Data must be shared across all controllers on a given fabric.
4444
MTRStorageSharingTypeSameFabric,
45-
} MTR_NEWLY_AVAILABLE;
45+
} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
4646

4747
/**
4848
* Protocol for storing and retrieving controller-specific data.
@@ -65,7 +65,7 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) {
6565
* and are provided to describe the data should the storage delegate choose to
6666
* implement separating storage location by security level and sharing type.
6767
*/
68-
MTR_NEWLY_AVAILABLE
68+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
6969
@protocol MTRDeviceControllerStorageDelegate <NSObject>
7070
@required
7171
/**
@@ -125,8 +125,7 @@ MTR_NEWLY_AVAILABLE
125125
sharingType:(MTRStorageSharingType)sharingType;
126126
@end
127127

128-
MTR_EXTERN MTR_NEWLY_AVAILABLE
129-
NSSet<Class> *
130-
MTRDeviceControllerStorageClasses(void);
128+
MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
129+
NSSet<Class> * MTRDeviceControllerStorageClasses(void);
131130

132131
NS_ASSUME_NONNULL_END

src/darwin/Framework/CHIP/MTRDiagnosticLogsType.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ typedef NS_ENUM(NSInteger, MTRDiagnosticLogType) {
2424
MTRDiagnosticLogTypeEndUserSupport = 0, // End user support log is requested
2525
MTRDiagnosticLogTypeNetworkDiagnostics = 1, // Network Diagnostics log is requested
2626
MTRDiagnosticLogTypeCrash = 2 // Crash log is requested
27-
} MTR_NEWLY_AVAILABLE;
27+
} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));

src/darwin/Framework/CHIP/MTRError.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){
9595
/**
9696
* The operation was cancelled.
9797
*/
98-
MTRErrorCodeCancelled MTR_NEWLY_AVAILABLE = 16,
98+
MTRErrorCodeCancelled MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))= 16,
9999
};
100100
// clang-format on
101101

@@ -138,8 +138,8 @@ typedef NS_ERROR_ENUM(MTRInteractionErrorDomain, MTRInteractionErrorCode){
138138
MTRInteractionErrorCodePathsExhausted = 0xc8,
139139
MTRInteractionErrorCodeTimedRequestMismatch = 0xc9,
140140
MTRInteractionErrorCodeFailsafeRequired = 0xca,
141-
MTRInteractionErrorCodeInvalidInState MTR_NEWLY_AVAILABLE = 0xcb,
142-
MTRInteractionErrorCodeNoCommandResponse MTR_NEWLY_AVAILABLE = 0xcc,
141+
MTRInteractionErrorCodeInvalidInState MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))= 0xcb,
142+
MTRInteractionErrorCodeNoCommandResponse MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))= 0xcc,
143143
};
144144
// clang-format on
145145

src/darwin/Framework/CHIP/MTRMetrics.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
2323
/**
2424
* Representation of metric data corresponding to a metric event.
2525
*/
26-
MTR_NEWLY_AVAILABLE
26+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
2727
@interface MTRMetricData : NSObject
2828

2929
/**
@@ -49,7 +49,7 @@ MTR_NEWLY_AVAILABLE
4949
/**
5050
* A representation of a collection of metrics data for an operation.
5151
*/
52-
MTR_NEWLY_AVAILABLE
52+
MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
5353
@interface MTRMetrics : NSObject
5454

5555
- (instancetype)init NS_UNAVAILABLE;

0 commit comments

Comments
 (0)