Skip to content

Commit

Permalink
Add privacy manifest for iOS and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsenko committed Apr 24, 2024
1 parent ab64653 commit e4008e9
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
31 changes: 31 additions & 0 deletions packages/realm/ios/Resources/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>
3 changes: 2 additions & 1 deletion packages/realm/ios/realm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Pod::Spec.new do |s|
s.vendored_frameworks = 'realm_dart.xcframework'
s.dependency 'Flutter'
s.platform = :ios, '8.0'
s.compiler_flags = "-DBUNDLE_ID='\"#{bundleId}\"'"
s.compiler_flags = "-DBUNDLE_ID='\"#{bundleId}\"'"
s.library = 'c++', 'z', 'compression'

s.swift_version = '5.0'
Expand Down Expand Up @@ -63,4 +63,5 @@ Pod::Spec.new do |s|
:execution_position => :before_compile
}
]
s.resource_bundles = { 'realm_privacy' => [ 'Resources/PrivacyInfo.xcprivacy' ] }
end
31 changes: 31 additions & 0 deletions packages/realm/macos/Resources/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>
7 changes: 4 additions & 3 deletions packages/realm/macos/realm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ Pod::Spec.new do |s|
s.license = { :file => '../LICENSE' }
s.author = { 'Realm' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'

s.platform = :osx, '10.11'
s.compiler_flags = "-DBUNDLE_ID='\"#{bundleId}\"'"
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.compiler_flags = "-DBUNDLE_ID='\"#{bundleId}\"'"
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
s.vendored_libraries = "#{realmLibName}"
s.prepare_command = "touch #{realmPackageDir}/librealm_dart.dylib" #librealm_dart.dylib is needed before the build is started
Expand All @@ -65,4 +65,5 @@ Pod::Spec.new do |s|
:execution_position => :before_compile
}
]
s.resource_bundles = { 'realm_privacy' => [ 'Resources/PrivacyInfo.xcprivacy' ] }
end

0 comments on commit e4008e9

Please sign in to comment.