Skip to content

Commit

Permalink
Cleaner solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kneth committed May 3, 2024
1 parent 922c970 commit 1eed0df
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
31 changes: 31 additions & 0 deletions packages/realm/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
</dict>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
10 changes: 2 additions & 8 deletions packages/realm/RealmJS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,12 @@ Pod::Spec.new do |s|

s.source_files = 'react-native/ios/RealmReact/*.mm'
s.public_header_files = 'react-native/ios/RealmReact/*.h'

s.resource_bundles = { 'RealmJS' => ['PrivacyInfo.xcprivacy'] }

s.frameworks = uses_frameworks ? ['React'] : []

s.library = 'c++', 'z', 'compression'

s.pod_target_xcconfig = {
# Setting up clang
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
'CLANG_CXX_LIBRARY' => 'libc++',
# Setting the current project version and versioning system to get a symbol for analytics
'CURRENT_PROJECT_VERSION' => s.version,
'VERSIONING_SYSTEM' => 'apple-generic',
# Header search paths are prefixes to the path specified in #include macros
'HEADER_SEARCH_PATHS' => [
'"$(PODS_TARGET_SRCROOT)/react-native/ios/RealmReact/"',
Expand Down
2 changes: 1 addition & 1 deletion packages/realm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
"types.d.cts",
"react-native/android",
"react-native/ios/realm-js-ios.xcframework",
"react-native/ios/realm-js-ios.xcframework/PrivacyInfo.xcprivacy",
"react-native/ios/realm-js-ios.xcframework/**/*.a",
"react-native/ios/RealmReact",
"bindgen/vendor/realm-core/dependencies.list",
"scripts/submit-analytics.mjs",
"react-native.config.js",
"RealmJS.podspec",
"PrivacyInfo.xcprivacy",
"binding.gyp"
],
"scripts": {
Expand Down
3 changes: 0 additions & 3 deletions packages/realm/scripts/build-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,3 @@ rm -rf ../realm-js-ios.xcframework
xcodebuild -create-xcframework \
"${LIBRARIES[@]}" \
-output ../realm-js-ios.xcframework

# Add the privacy manifest to the generated framework
cp "${PROJECT_ROOT}/PrivacyInfo.xcprivacy" ../realm-js-ios.xcframework

0 comments on commit 1eed0df

Please sign in to comment.