Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the MTRDevice ivars protected. (#35101)
It seems like by default we have the following visibility options here: @Private - subclasses can't touch, not workable. @public - anyone can touch, not desirable. @Package - @public inside Matter.framework, @Private ouside it. Does not export the symbols, but anyone inside Matter.framework can touch. @Protected - only subclasses can touch, but exports the symbols in case we have out-of-framework subclasses who want to touch it. Since the declarations are in a project header that TAPI does not know about in release builds, we get complaints about mismatches between what's declared public and what's exported. What we would really want here is "@Protected inside Matter.framework, @Private ouside it", but that does not exist. So this switches to @Protected, and uses linker arguments to not export the symbols in release builds. Since the header itself is not public, this accomplishes the same goal. In debug builds, we do expose project headers to TAPI, hence there we want to keep exporting the symbols. The linker arguments just prevent exporting all ivar symbols, since we shouldn't be exporting any of those anyway.
- Loading branch information