Skip to content

Commit

Permalink
Darwin: Update zap to 2023.3.6 to adopt MTR_DEPRECATED for all ObjC d…
Browse files Browse the repository at this point in the history
…eprecations (#25501)

This marks deprecated symbols that introduce API ambiguity in Swift as disfavored rather than unavailable.
  • Loading branch information
ksperling-apple authored and pull[bot] committed Jan 18, 2024
1 parent e7af5bd commit 1132296
Show file tree
Hide file tree
Showing 33 changed files with 8,186 additions and 10,006 deletions.
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-cert-bins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb
# ZAP Development install, so that it runs on both x64 and arm64
# Generally this should match with the ZAP version that is used for codegen within the
# specified SHA
ARG ZAP_VERSION=v2023.02.25-nightly
ARG ZAP_VERSION=v2023.03.06-nightly

# Ensure TARGETPLATFORM is set
RUN case ${TARGETPLATFORM} in \
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup/zap.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"mac-arm64",
"windows-amd64"
],
"tags": ["version:2@v2023.02.25-nightly.1"]
"tags": ["version:2@v2023.03.06-nightly.1"]
}
]
}
2 changes: 1 addition & 1 deletion scripts/tools/zap/zap_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Use scripts/tools/zap/version_update.py to manage ZAP versioning as many
# files may need updating for versions
#
MIN_ZAP_VERSION = '2023.2.25'
MIN_ZAP_VERSION = '2023.3.6'


class ZapTool:
Expand Down
18 changes: 9 additions & 9 deletions src/darwin/Framework/CHIP/MTRBaseDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
errorHandler:(MTRDeviceErrorHandler)errorHandler
subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler
resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler
API_DEPRECATED("Please use "
MTR_DEPRECATED("Please use "
"subscribeWithQueue:params:clusterStateCacheContainer:attributeReportHandler:eventReportHandler:errorHandler:"
"subscriptionEstablished:resubscriptionScheduled:",
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
Expand All @@ -506,7 +506,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) {
params:(MTRReadParams * _Nullable)params
clientQueue:(dispatch_queue_t)clientQueue
completion:(MTRDeviceResponseHandler)completion
API_DEPRECATED("Please use readAttributesWithEndpointID:clusterID:attributeID:params:queue:completion:", ios(16.1, 16.4),
MTR_DEPRECATED("Please use readAttributesWithEndpointID:clusterID:attributeID:params:queue:completion:", ios(16.1, 16.4),
macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));

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

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

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

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

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

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

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

@end
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRCSRInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))

@end

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))
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))
@interface CSRInfo : NSObject

@property (nonatomic, copy) NSData * nonce;
Expand Down
8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIP/MTRCertificates.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ NS_ASSUME_NONNULL_BEGIN
issuerId:(nullable NSNumber *)issuerId
fabricId:(nullable NSNumber *)fabricId
error:(NSError * __autoreleasing _Nullable * _Nullable)error
API_DEPRECATED("Please use createRootCertificate:issuerID:fabricID:error:", ios(16.1, 16.4), macos(13.0, 13.3),
MTR_DEPRECATED("Please use createRootCertificate:issuerID:fabricID:error:", ios(16.1, 16.4), macos(13.0, 13.3),
watchos(9.1, 9.4), tvos(16.1, 16.4));

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

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

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

@end
Expand Down
18 changes: 9 additions & 9 deletions src/darwin/Framework/CHIP/MTRCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* limitations under the License.
*/

#import <Foundation/Foundation.h>
#import <Matter/MTRDefines.h>

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))
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))
typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error);
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))
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))
typedef void (^StatusCompletion)(NSError * _Nullable error);
API_DEPRECATED(
MTR_DEPRECATED(
"Please use MTRSubscriptionEstablishedHandler instead", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
typedef void (^SubscriptionEstablishedHandler)(void);

Expand Down Expand Up @@ -177,16 +177,16 @@ NS_ASSUME_NONNULL_BEGIN

@interface MTRReadParams (Deprecated)

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

@end

@interface MTRSubscribeParams (Deprecated)

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

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

Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))

@end

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))
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))
@interface MTRAttributeCacheContainer : NSObject

- (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId
Expand Down
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ extern NSString * const MTREventTimestampDateKey MTR_NEWLY_AVAILABLE;
*/
+ (MTRDevice *)deviceWithNodeID:(uint64_t)nodeID
deviceController:(MTRDeviceController *)deviceController
API_DEPRECATED(
MTR_DEPRECATED(
"Please use deviceWithNodeID:controller:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));

- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID
Expand All @@ -255,7 +255,7 @@ extern NSString * const MTREventTimestampDateKey MTR_NEWLY_AVAILABLE;
timedInvokeTimeout:(NSNumber * _Nullable)timeout
clientQueue:(dispatch_queue_t)queue
completion:(MTRDeviceResponseHandler)completion
API_DEPRECATED("Please use "
MTR_DEPRECATED("Please use "
"invokeCommandWithEndpointID:clusterID:commandID:commandFields:expectedValues:expectedValueInterval:"
"timedInvokeTimeout:queue:completion:",
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));
Expand Down
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ NS_ASSUME_NONNULL_BEGIN
completedForDevice:(void *)device
attestationDeviceInfo:(MTRDeviceAttestationDeviceInfo *)attestationDeviceInfo
error:(NSError * _Nullable)error
API_DEPRECATED("Please implement deviceAttestationCompletedForController:opaqueDeviceHandle:attestationDeviceInfo:error:",
MTR_DEPRECATED("Please implement deviceAttestationCompletedForController:opaqueDeviceHandle:attestationDeviceInfo:error:",
ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4));

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

@end
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceAttestationInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))

@end

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))
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))
@interface AttestationInfo : NSObject

@property (nonatomic, copy) NSData * challenge;
Expand Down
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRDeviceController+XPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error)
*/
- (void)getDeviceControllerWithFabricId:(uint64_t)fabricId
completion:(MTRDeviceControllerGetterHandler)completion
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));
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));

@required
/**
Expand Down Expand Up @@ -203,7 +203,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error)

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

@end
Expand Down
Loading

0 comments on commit 1132296

Please sign in to comment.