Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* value being subtly wrong.
*/
import { execFileSync } from 'child_process';
import { existsSync } from 'fs';
import { join } from 'path';

const PACKAGE_ROOT = join(__dirname, '..', '..');
Expand Down Expand Up @@ -147,6 +148,7 @@
'vendored_frameworks',
'libraries',
'frameworks',
'resource_bundles',
];

/**
Expand All @@ -173,6 +175,10 @@
};

describe('podspec attributes', () => {
it('ships the privacy manifest its resource bundle names (#1616)', () => {
expect(existsSync(join(PACKAGE_ROOT, 'ios', 'PrivacyInfo.xcprivacy'))).toBe(true);

Check warning on line 179 in packages/react-native-executorch/__tests__/api/podspecAttributes.test.ts

View workflow job for this annotation

GitHub Actions / lint

Unknown word: "xcprivacy"
});

describe.each(Object.entries(CONFIGS))('with %s', (_label, config) => {
it('evaluates and assigns every attribute the build depends on', () => {
const assigned = assignedAttributes(config);
Expand Down
36 changes: 36 additions & 0 deletions packages/react-native-executorch/ios/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?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>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ Pod::Spec.new do |s|
# resource path. `s.ios.resource` achieves that via CocoaPods' resource copy.
s.ios.resource = "third-party/ios/libs/executorch/mlx.metallib" if enable_mlx

# Required-reason APIs (stat/fstat in ExecutorchLib and the Core ML backend)
# and the download telemetry. The file must exist: a missing one globs to an
# empty bundle without any error.
s.resource_bundles = { "RnExecutorchPrivacyInfo" => ["ios/PrivacyInfo.xcprivacy"] }

# An app that turns on `use_frameworks!` without naming a linkage gets the
# default, dynamic - which is what Firebase's own setup instructions show.
# CocoaPods then refuses to install at all, because a dynamic framework may
Expand Down
Loading