Skip to content

Commit 2650685

Browse files
ksperling-applepull[bot]
authored andcommitted
Darwin: Update zap to 2023.3.6 to adopt MTR_DEPRECATED for all ObjC deprecations (#25501)
This marks deprecated symbols that introduce API ambiguity in Swift as disfavored rather than unavailable.
1 parent 419a083 commit 2650685

33 files changed

+8186
-10006
lines changed

integrations/docker/images/chip-cert-bins/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb
77
# ZAP Development install, so that it runs on both x64 and arm64
88
# Generally this should match with the ZAP version that is used for codegen within the
99
# specified SHA
10-
ARG ZAP_VERSION=v2023.02.25-nightly
10+
ARG ZAP_VERSION=v2023.03.06-nightly
1111

1212
# Ensure TARGETPLATFORM is set
1313
RUN case ${TARGETPLATFORM} in \

scripts/setup/zap.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"mac-arm64",
99
"windows-amd64"
1010
],
11-
"tags": ["version:2@v2023.02.25-nightly.1"]
11+
"tags": ["version:2@v2023.03.06-nightly.1"]
1212
}
1313
]
1414
}

scripts/tools/zap/zap_execution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Use scripts/tools/zap/version_update.py to manage ZAP versioning as many
2424
# files may need updating for versions
2525
#
26-
MIN_ZAP_VERSION = '2023.2.25'
26+
MIN_ZAP_VERSION = '2023.3.6'
2727

2828

2929
class ZapTool:

src/darwin/Framework/CHIP/MTRBaseDevice.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
495495
errorHandler:(MTRDeviceErrorHandler)errorHandler
496496
subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler
497497
resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler
498-
API_DEPRECATED("Please use "
498+
MTR_DEPRECATED("Please use "
499499
"subscribeWithQueue:params:clusterStateCacheContainer:attributeReportHandler:eventReportHandler:errorHandler:"
500500
"subscriptionEstablished:resubscriptionScheduled:",
501501
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
@@ -506,7 +506,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
506506
params:(MTRReadParams * _Nullable)params
507507
clientQueue:(dispatch_queue_t)clientQueue
508508
completion:(MTRDeviceResponseHandler)completion
509-
API_DEPRECATED("Please use readAttributesWithEndpointID:clusterID:attributeID:params:queue:completion:", ios(16.1, 16.4),
509+
MTR_DEPRECATED("Please use readAttributesWithEndpointID:clusterID:attributeID:params:queue:completion:", ios(16.1, 16.4),
510510
macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
511511

512512
- (void)writeAttributeWithEndpointId:(NSNumber *)endpointId
@@ -516,7 +516,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
516516
timedWriteTimeout:(NSNumber * _Nullable)timeoutMs
517517
clientQueue:(dispatch_queue_t)clientQueue
518518
completion:(MTRDeviceResponseHandler)completion
519-
API_DEPRECATED("Please use writeAttributeWithEndpointID:clusterID:attributeID:value:timedWriteTimeout:queue:completion:",
519+
MTR_DEPRECATED("Please use writeAttributeWithEndpointID:clusterID:attributeID:value:timedWriteTimeout:queue:completion:",
520520
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
521521

522522
- (void)invokeCommandWithEndpointId:(NSNumber *)endpointId
@@ -526,7 +526,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
526526
timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs
527527
clientQueue:(dispatch_queue_t)clientQueue
528528
completion:(MTRDeviceResponseHandler)completion
529-
API_DEPRECATED("Please use invokeCommandWithEndpointID:clusterID:commandID:commandFields:timedInvokeTimeout:queue:completion",
529+
MTR_DEPRECATED("Please use invokeCommandWithEndpointID:clusterID:commandID:commandFields:timedInvokeTimeout:queue:completion",
530530
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
531531

532532
- (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId
@@ -538,14 +538,14 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
538538
clientQueue:(dispatch_queue_t)clientQueue
539539
reportHandler:(MTRDeviceResponseHandler)reportHandler
540540
subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler
541-
API_DEPRECATED("Please use "
541+
MTR_DEPRECATED("Please use "
542542
"subscribeToAttributesWithEndpointID:clusterID:attributeID:params:queue:"
543543
"reportHandler:subscriptionEstablished:",
544544
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
545545

546546
- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)queue
547547
completion:(dispatch_block_t)completion
548-
API_DEPRECATED("Pease use deregisterReportHandlersWithQueue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
548+
MTR_DEPRECATED("Pease use deregisterReportHandlersWithQueue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
549549
tvos(16.1, 16.4));
550550

551551
@end
@@ -555,7 +555,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
555555
+ (instancetype)attributePathWithEndpointId:(NSNumber *)endpointId
556556
clusterId:(NSNumber *)clusterId
557557
attributeId:(NSNumber *)attributeId
558-
API_DEPRECATED("Please use attributePathWithEndpointID:clusterID:attributeID:", ios(16.1, 16.4), macos(13.0, 13.3),
558+
MTR_DEPRECATED("Please use attributePathWithEndpointID:clusterID:attributeID:", ios(16.1, 16.4), macos(13.0, 13.3),
559559
watchos(9.1, 9.4), tvos(16.1, 16.4));
560560

561561
@end
@@ -565,7 +565,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
565565
+ (instancetype)eventPathWithEndpointId:(NSNumber *)endpointId
566566
clusterId:(NSNumber *)clusterId
567567
eventId:(NSNumber *)eventId
568-
API_DEPRECATED("Please use eventPathWithEndpointID:clusterID:eventID:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
568+
MTR_DEPRECATED("Please use eventPathWithEndpointID:clusterID:eventID:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
569569
tvos(16.1, 16.4));
570570

571571
@end
@@ -575,7 +575,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
575575
+ (instancetype)commandPathWithEndpointId:(NSNumber *)endpointId
576576
clusterId:(NSNumber *)clusterId
577577
commandId:(NSNumber *)commandId
578-
API_DEPRECATED("Please use commandPathWithEndpointID:clusterID:commandID:", ios(16.1, 16.4), macos(13.0, 13.3),
578+
MTR_DEPRECATED("Please use commandPathWithEndpointID:clusterID:commandID:", ios(16.1, 16.4), macos(13.0, 13.3),
579579
watchos(9.1, 9.4), tvos(16.1, 16.4));
580580

581581
@end

src/darwin/Framework/CHIP/MTRCSRInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
6161

6262
@end
6363

64-
API_DEPRECATED("Please use MTROperationalCSRInfo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
64+
MTR_DEPRECATED("Please use MTROperationalCSRInfo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
6565
@interface CSRInfo : NSObject
6666

6767
@property (nonatomic, copy) NSData * nonce;

src/darwin/Framework/CHIP/MTRCertificates.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ NS_ASSUME_NONNULL_BEGIN
177177
issuerId:(nullable NSNumber *)issuerId
178178
fabricId:(nullable NSNumber *)fabricId
179179
error:(NSError * __autoreleasing _Nullable * _Nullable)error
180-
API_DEPRECATED("Please use createRootCertificate:issuerID:fabricID:error:", ios(16.1, 16.4), macos(13.0, 13.3),
180+
MTR_DEPRECATED("Please use createRootCertificate:issuerID:fabricID:error:", ios(16.1, 16.4), macos(13.0, 13.3),
181181
watchos(9.1, 9.4), tvos(16.1, 16.4));
182182

183183
+ (nullable NSData *)generateIntermediateCertificate:(id<MTRKeypair>)rootKeypair
@@ -186,7 +186,7 @@ NS_ASSUME_NONNULL_BEGIN
186186
issuerId:(nullable NSNumber *)issuerId
187187
fabricId:(nullable NSNumber *)fabricId
188188
error:(NSError * __autoreleasing _Nullable * _Nullable)error
189-
API_DEPRECATED("Please use createIntermediateCertificate:rootCertificate:intermediatePublicKey:issuerID:fabricID:error:",
189+
MTR_DEPRECATED("Please use createIntermediateCertificate:rootCertificate:intermediatePublicKey:issuerID:fabricID:error:",
190190
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
191191

192192
+ (nullable NSData *)generateOperationalCertificate:(id<MTRKeypair>)signingKeypair
@@ -196,14 +196,14 @@ NS_ASSUME_NONNULL_BEGIN
196196
nodeId:(NSNumber *)nodeId
197197
caseAuthenticatedTags:(NSArray<NSNumber *> * _Nullable)caseAuthenticatedTags
198198
error:(NSError * __autoreleasing _Nullable * _Nullable)error
199-
API_DEPRECATED(
199+
MTR_DEPRECATED(
200200
"Plase use "
201201
"createOperationalCertificate:signingCertificate:operationalPublicKey:fabricID:nodeID:caseAuthenticatedTags:error:",
202202
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
203203

204204
+ (nullable NSData *)generateCertificateSigningRequest:(id<MTRKeypair>)keypair
205205
error:(NSError * __autoreleasing _Nullable * _Nullable)error
206-
API_DEPRECATED("Please use createCertificateSigningRequest:error:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
206+
MTR_DEPRECATED("Please use createCertificateSigningRequest:error:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
207207
tvos(16.1, 16.4));
208208

209209
@end

src/darwin/Framework/CHIP/MTRCluster.h

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

18-
#import <Foundation/Foundation.h>
18+
#import <Matter/MTRDefines.h>
1919

20-
API_DEPRECATED("ResponseHandler is not used", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
20+
MTR_DEPRECATED("ResponseHandler is not used", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
2121
typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error);
22-
API_DEPRECATED("Please use MTRStatusCompletion instead", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
22+
MTR_DEPRECATED("Please use MTRStatusCompletion instead", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
2323
typedef void (^StatusCompletion)(NSError * _Nullable error);
24-
API_DEPRECATED(
24+
MTR_DEPRECATED(
2525
"Please use MTRSubscriptionEstablishedHandler instead", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
2626
typedef void (^SubscriptionEstablishedHandler)(void);
2727

@@ -177,16 +177,16 @@ NS_ASSUME_NONNULL_BEGIN
177177

178178
@interface MTRReadParams (Deprecated)
179179

180-
@property (nonatomic, copy, nullable) NSNumber * fabricFiltered API_DEPRECATED(
180+
@property (nonatomic, copy, nullable) NSNumber * fabricFiltered MTR_DEPRECATED(
181181
"Please use filterByFabric", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
182182

183183
@end
184184

185185
@interface MTRSubscribeParams (Deprecated)
186186

187-
@property (nonatomic, copy, nullable) NSNumber * keepPreviousSubscriptions API_DEPRECATED(
187+
@property (nonatomic, copy, nullable) NSNumber * keepPreviousSubscriptions MTR_DEPRECATED(
188188
"Please use replaceExistingSubscriptions", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
189-
@property (nonatomic, copy, nullable) NSNumber * autoResubscribe API_DEPRECATED(
189+
@property (nonatomic, copy, nullable) NSNumber * autoResubscribe MTR_DEPRECATED(
190190
"Please use resubscribeAutomatically", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
191191

192192
/**
@@ -195,9 +195,9 @@ NS_ASSUME_NONNULL_BEGIN
195195
* own. Uses of MTRSubscribeParams that rely on init must all be using
196196
* (deprecated) APIs that pass in a separate minInterval and maxInterval.
197197
*/
198-
- (instancetype)init API_DEPRECATED(
198+
- (instancetype)init MTR_DEPRECATED(
199199
"Please use initWithMinInterval", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
200-
+ (instancetype)new API_DEPRECATED(
200+
+ (instancetype)new MTR_DEPRECATED(
201201
"Please use initWithMinInterval", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
202202
@end
203203

src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
5454

5555
@end
5656

57-
API_DEPRECATED("Please use MTRClusterStateCacheContainer", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
57+
MTR_DEPRECATED("Please use MTRClusterStateCacheContainer", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
5858
@interface MTRAttributeCacheContainer : NSObject
5959

6060
- (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId

src/darwin/Framework/CHIP/MTRDevice.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ extern NSString * const MTREventTimestampDateKey MTR_NEWLY_AVAILABLE;
243243
*/
244244
+ (MTRDevice *)deviceWithNodeID:(uint64_t)nodeID
245245
deviceController:(MTRDeviceController *)deviceController
246-
API_DEPRECATED(
246+
MTR_DEPRECATED(
247247
"Please use deviceWithNodeID:controller:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
248248

249249
- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID
@@ -255,7 +255,7 @@ extern NSString * const MTREventTimestampDateKey MTR_NEWLY_AVAILABLE;
255255
timedInvokeTimeout:(NSNumber * _Nullable)timeout
256256
clientQueue:(dispatch_queue_t)queue
257257
completion:(MTRDeviceResponseHandler)completion
258-
API_DEPRECATED("Please use "
258+
MTR_DEPRECATED("Please use "
259259
"invokeCommandWithEndpointID:clusterID:commandID:commandFields:expectedValues:expectedValueInterval:"
260260
"timedInvokeTimeout:queue:completion:",
261261
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));

src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ NS_ASSUME_NONNULL_BEGIN
9595
completedForDevice:(void *)device
9696
attestationDeviceInfo:(MTRDeviceAttestationDeviceInfo *)attestationDeviceInfo
9797
error:(NSError * _Nullable)error
98-
API_DEPRECATED("Please implement deviceAttestationCompletedForController:opaqueDeviceHandle:attestationDeviceInfo:error:",
98+
MTR_DEPRECATED("Please implement deviceAttestationCompletedForController:opaqueDeviceHandle:attestationDeviceInfo:error:",
9999
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
100100

101101
- (void)deviceAttestation:(MTRDeviceController *)controller
102102
failedForDevice:(void *)device
103103
error:(NSError * _Nonnull)error
104-
API_DEPRECATED("Please implement deviceAttestationFailedForController:opaqueDeviceHandle:error:", ios(16.1, 16.4),
104+
MTR_DEPRECATED("Please implement deviceAttestationFailedForController:opaqueDeviceHandle:error:", ios(16.1, 16.4),
105105
macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
106106

107107
@end

src/darwin/Framework/CHIP/MTRDeviceAttestationInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
8181

8282
@end
8383

84-
API_DEPRECATED("Please use MTRDeviceAttestationInfo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
84+
MTR_DEPRECATED("Please use MTRDeviceAttestationInfo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
8585
@interface AttestationInfo : NSObject
8686

8787
@property (nonatomic, copy) NSData * challenge;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error)
9898
*/
9999
- (void)getDeviceControllerWithFabricId:(uint64_t)fabricId
100100
completion:(MTRDeviceControllerGetterHandler)completion
101-
API_DEPRECATED("This never called.", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
101+
MTR_DEPRECATED("This never called.", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
102102

103103
@required
104104
/**
@@ -203,7 +203,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error)
203203

204204
+ (MTRDeviceController *)sharedControllerWithId:(id<NSCopying> _Nullable)controllerID
205205
xpcConnectBlock:(MTRXPCConnectBlock)xpcConnectBlock
206-
API_DEPRECATED("Please use sharedControllerWithID:xpcConnectBlock:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
206+
MTR_DEPRECATED("Please use sharedControllerWithID:xpcConnectBlock:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4),
207207
tvos(16.1, 16.4));
208208

209209
@end

0 commit comments

Comments
 (0)