From 1e40c93c8163f7d1a6d0d4c3cb9d51190a79aafa Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 23 Jun 2023 00:52:46 -0400 Subject: [PATCH] Revert "Enable TAPI_VERIFY_MODE=Pedantic." (#27428) --- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 2 -- src/darwin/Framework/CHIP/MTRCommissionableBrowser.h | 2 -- .../CHIP/MTRCommissionableBrowserResult_Internal.h | 2 -- src/darwin/Framework/CHIP/MTRControllerAccessControl.h | 2 -- src/darwin/Framework/CHIP/MTRDefines.h | 2 -- src/darwin/Framework/CHIP/MTRDevice.mm | 2 -- src/darwin/Framework/CHIP/MTRDeviceController.mm | 4 ---- src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h | 2 -- .../CHIP/MTRDeviceControllerStartupParams_Internal.h | 2 -- .../Framework/CHIP/MTRDeviceControllerXPCConnection.h | 4 ---- src/darwin/Framework/CHIP/MTRDeviceOverXPC.h | 3 --- src/darwin/Framework/CHIP/MTRError.mm | 3 --- src/darwin/Framework/CHIP/MTRError_Internal.h | 2 -- src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm | 4 +--- src/darwin/Framework/Matter.xcodeproj/project.pbxproj | 8 -------- 15 files changed, 1 insertion(+), 43 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 45c9fde406c529..cd98c233935aa1 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#import #import "MTRAttributeTLVValueDecoder_Internal.h" #import "MTRBaseDevice_Internal.h" @@ -87,7 +86,6 @@ class MTRDataValueDictionaryCallbackBridge; -MTR_HIDDEN @interface MTRReadClientContainer : NSObject @property (nonatomic, readwrite) app::ReadClient * readClientPtr; @property (nonatomic, readwrite) app::AttributePathParams * pathParams; diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h index 4ab4b9559b1f2d..9b6a639133fcea 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.h @@ -16,13 +16,11 @@ */ #import -#import NS_ASSUME_NONNULL_BEGIN @protocol MTRCommissionableBrowserDelegate; -MTR_HIDDEN @interface MTRCommissionableBrowser : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h b/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h index bf312d83361117..f60f50f74521fd 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowserResult_Internal.h @@ -16,7 +16,6 @@ */ #import -#import #import "MTRCommissionableBrowserResult.h" @@ -24,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRCommissionableBrowserResultInterfaces : NSObject @property (nonatomic, readwrite) chip::Optional resolutionData; diff --git a/src/darwin/Framework/CHIP/MTRControllerAccessControl.h b/src/darwin/Framework/CHIP/MTRControllerAccessControl.h index 81060ddca6d0b4..6adc5288212088 100644 --- a/src/darwin/Framework/CHIP/MTRControllerAccessControl.h +++ b/src/darwin/Framework/CHIP/MTRControllerAccessControl.h @@ -16,11 +16,9 @@ #pragma once #import -#import NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRControllerAccessControl : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 55a053e9639339..2c6a4eea7dd6ed 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -21,8 +21,6 @@ #define MTR_EXPORT __attribute__((visibility("default"))) -#define MTR_HIDDEN __attribute__((visibility("hidden"))) - #ifdef __cplusplus #define MTR_EXTERN extern "C" MTR_EXPORT #else diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 553f5bd24055c5..dc158c89f768ec 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -15,7 +15,6 @@ * limitations under the License. */ -#import #import #import "MTRAsyncCallbackWorkQueue_Internal.h" @@ -45,7 +44,6 @@ // Consider moving utility classes to their own file #pragma mark - Utility Classes // This class is for storing weak references in a container -MTR_HIDDEN @interface MTRWeakReference : NSObject + (instancetype)weakReferenceWithObject:(ObjectType)object; - (instancetype)initWithObject:(ObjectType)object; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 4b7f7fcc7f0f57..5c4ae26c1f92b6 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#import - #import "MTRDeviceController_Internal.h" #import "MTRBaseDevice_Internal.h" @@ -1023,7 +1021,6 @@ - (void)operationalInstanceAdded:(chip::NodeId)nodeID * Shim to allow us to treat an MTRDevicePairingDelegate as an * MTRDeviceControllerDelegate. */ -MTR_HIDDEN @interface MTRDevicePairingDelegateShim : NSObject @property (nonatomic, readonly) id delegate; - (instancetype)initWithDelegate:(id)delegate; @@ -1081,7 +1078,6 @@ - (void)onPairingDeleted:(NSError * _Nullable)error * Shim to allow us to treat an MTRNOCChainIssuer as an * MTROperationalCertificateIssuer. */ -MTR_HIDDEN @interface MTROperationalCertificateChainIssuerShim : NSObject @property (nonatomic, readonly) id nocChainIssuer; @property (nonatomic, readonly) BOOL shouldSkipAttestationCertificateValidation; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h index b4c383b6481963..f51f8292a83d76 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.h @@ -15,7 +15,6 @@ * limitations under the License. */ -#import #import NS_ASSUME_NONNULL_BEGIN @@ -24,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN typedef NSXPCConnection * _Nonnull (^MTRXPCConnectBlock)(void); -MTR_HIDDEN @interface MTRDeviceControllerOverXPC : MTRDeviceController - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 24acc7a2dbb3a8..146a4bad978985 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -18,7 +18,6 @@ #import "MTRDeviceControllerStartupParams.h" #import -#import #include #include @@ -43,7 +42,6 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @end -MTR_HIDDEN @interface MTRDeviceControllerStartupParamsInternal : MTRDeviceControllerStartupParams // Fabric table we can use to do things like allocate operational keys. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h index 0dc4592f2ea981..8660a4fbb07a10 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerXPCConnection.h @@ -15,8 +15,6 @@ * limitations under the License. */ -#import - #import "MTRDeviceController+XPC.h" NS_ASSUME_NONNULL_BEGIN @@ -29,7 +27,6 @@ typedef void (^MTRXPCReportHandler)(id _Nullable values, NSError * _Nullable err * Releasing the handle may cause invalidating the XPC connection. Hence, in order to retain the connection, the handle must not be * released. */ -MTR_HIDDEN @interface MTRDeviceControllerXPCProxyHandle : NSObject @property (nonatomic, readonly, getter=proxy) id proxy; @@ -43,7 +40,6 @@ typedef void (^MTRGetProxyHandleHandler)(dispatch_queue_t queue, MTRDeviceContro * * This class is in charge of making a new XPC connection and disconnecting as needed by the clients and by the report handlers. */ -MTR_HIDDEN @interface MTRDeviceControllerXPCConnection : NSObject /** diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h index c7da1f211110e0..9718c3ee34a3f7 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h @@ -15,8 +15,6 @@ * limitations under the License. */ -#import - #import "MTRBaseDevice.h" #import "MTRCluster.h" // For MTRSubscriptionEstablishedHandler #import "MTRDeviceControllerXPCConnection.h" @@ -25,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRDeviceOverXPC : MTRBaseDevice - (instancetype)init NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRError.mm b/src/darwin/Framework/CHIP/MTRError.mm index 94cc4cabfe4975..f4e5afae4a6675 100644 --- a/src/darwin/Framework/CHIP/MTRError.mm +++ b/src/darwin/Framework/CHIP/MTRError.mm @@ -15,8 +15,6 @@ * limitations under the License. */ -#import - #import "MTRError.h" #import "MTRError_Internal.h" @@ -34,7 +32,6 @@ // Class for holding on to a CHIP_ERROR that we can use as the value // in a dictionary. -MTR_HIDDEN @interface MTRErrorHolder : NSObject @property (nonatomic, readonly) CHIP_ERROR error; diff --git a/src/darwin/Framework/CHIP/MTRError_Internal.h b/src/darwin/Framework/CHIP/MTRError_Internal.h index 696895f02e234d..d41046ecbf5bd7 100644 --- a/src/darwin/Framework/CHIP/MTRError_Internal.h +++ b/src/darwin/Framework/CHIP/MTRError_Internal.h @@ -16,7 +16,6 @@ */ #import -#import #import #include @@ -24,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_HIDDEN @interface MTRError : NSObject + (NSError * _Nullable)errorForCHIPErrorCode:(CHIP_ERROR)errorCode; + (NSError * _Nullable)errorForIMStatus:(const chip::app::StatusIB &)status; diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index d64522f4ceded7..75ea6a45ecc205 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -492,11 +492,9 @@ CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) uint64_t mTransferGeneration = 0; }; -namespace { BdxOTASender gOtaSender; -NSInteger const kOtaProviderEndpoint = 0; -} // anonymous namespace +static NSInteger const kOtaProviderEndpoint = 0; MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(id delegate) : mDelegate(delegate) diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index d5d91a5076b5f9..9cbf25d443f478 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -1753,7 +1753,6 @@ CoreBluetooth, "-lnetwork", "-Wl,-unexported_symbol,\"__Z*\"", - "-Wl,-hidden-lCHIP", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-framework", @@ -1768,14 +1767,11 @@ "-framework", CoreData, "-Wl,-unexported_symbol,\"__Z*\"", - "-Wl,-hidden-lCHIP", ); PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; - TAPI_VERIFY_MODE = Pedantic; TARGETED_DEVICE_FAMILY = "1,2,3,4"; - VERSION_INFO_EXPORT_DECL = "__attribute__((visibility(\"hidden\")))"; }; name = Debug; }; @@ -1909,7 +1905,6 @@ CoreBluetooth, "-lnetwork", "-Wl,-unexported_symbol,\"__Z*\"", - "-Wl,-hidden-lCHIP", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-framework", @@ -1924,15 +1919,12 @@ "-framework", CoreData, "-Wl,-unexported_symbol,\"__Z*\"", - "-Wl,-hidden-lCHIP", ); PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; STRIP_STYLE = "non-global"; - TAPI_VERIFY_MODE = Pedantic; TARGETED_DEVICE_FAMILY = "1,2,3,4"; - VERSION_INFO_EXPORT_DECL = "__attribute__((visibility(\"hidden\")))"; }; name = Release; };