diff --git a/CHANGELOG.md b/CHANGELOG.md index b7f7bd7391..6dca6ef481 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ x.y.z Release notes (yyyy-MM-dd) ============================================================= ### Enhancements * Add a privacy manifest to both frameworks. +* Internal C++ symbols are no longer exported from Realm.framework when + installing via CocoaPods, which reduces the size of the binary by ~5%, + improves app startup time a little, and eliminates some warnings when linking + the framework. This was already the case when using Carthage or a prebuilt + framework ([PR #8464](https://github.com/realm/realm-swift/pull/8464)). ### Fixed * `@Persisted`'s Encodable implementation did not allow the encoder to diff --git a/Realm.podspec b/Realm.podspec index fc0810c0e7..7e9035e8ff 100644 --- a/Realm.podspec +++ b/Realm.podspec @@ -144,9 +144,9 @@ Pod::Spec.new do |s| 'REALM_LD_CLASSIC_1400' => '', 'REALM_LD_CLASSIC_1500' => '-Wl,-ld_classic', 'REALM_LD_CLASSIC' => '$(REALM_LD_CLASSIC_$(XCODE_VERSION_MAJOR))', - 'OTHER_LDFLAGS' => '$(REALM_LD_CLASSIC)', + 'OTHER_LDFLAGS' => '$(REALM_LD_CLASSIC) "-Wl,-unexported_symbols_list,${PODS_ROOT}/Realm/Configuration/Realm/PrivateSymbols.txt"', } - s.preserve_paths = %w(include scripts) + s.preserve_paths = %w(include scripts Configuration/Realm/PrivateSymbols.txt) s.resource_bundles = {'realm_objc_privacy' => ['Realm/PrivacyInfo.xcprivacy']} s.ios.deployment_target = '11.0'