diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index 5a826dc9875bbe..bce5abfdfed75d 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -108,20 +108,7 @@ MTR_DIRECT_MEMBERS @interface MTRDevice () { // Ivars needed to implement shared MTRDevice functionality. - // - // Unfortunately, we can't use @protected here, because that exports the - // symbols (so that subclasses that are not part of the framework can see - // them), but TAPI does not see these declarations, because they are in a - // project header. - // - // Using @package means that the symbols do not need to be exported, but - // unfortunately gets treated as @public from inside our framework, which - // means random other framework code can access these ivars. Hopefully the - // naming with leading '_' will make it clearer that random other code - // should not touch these. - // - // TODO: Figure out some way of doing @protected but still not exporting the symbol. -@package +@protected // Lock that protects overall device state, including delegate storage. os_unfair_lock _lock; NSMutableSet * _delegates; diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 3a5968072d5a8d..efafd27d28dc1e 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -2565,6 +2565,7 @@ "-Wl,-unexported_symbol,\"___*\"", "-Wl,-unexported_symbol,\"__Unwind_*\"", "-Wl,-unexported_symbol,\"_unw_*\"", + "-Wl,-unexported_symbol,\"_OBJC_IVAR_*\"", "-Wl,-hidden-lCHIP", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( @@ -2583,6 +2584,7 @@ "-Wl,-unexported_symbol,\"___*\"", "-Wl,-unexported_symbol,\"__Unwind_*\"", "-Wl,-unexported_symbol,\"_unw_*\"", + "-Wl,-unexported_symbol,\"_OBJC_IVAR_*\"", "-Wl,-hidden-lCHIP", ); PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter;