diff --git a/packages/react-native-executorch/__tests__/api/podspecAttributes.test.ts b/packages/react-native-executorch/__tests__/api/podspecAttributes.test.ts index 9276e6ef14..03245f5014 100644 --- a/packages/react-native-executorch/__tests__/api/podspecAttributes.test.ts +++ b/packages/react-native-executorch/__tests__/api/podspecAttributes.test.ts @@ -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, '..', '..'); @@ -147,6 +148,7 @@ const UNCONDITIONAL_ATTRIBUTES = [ 'vendored_frameworks', 'libraries', 'frameworks', + 'resource_bundles', ]; /** @@ -173,6 +175,10 @@ const CONFIGS: Record | null> = { }; describe('podspec attributes', () => { + it('ships the privacy manifest its resource bundle names (#1616)', () => { + expect(existsSync(join(PACKAGE_ROOT, 'ios', 'PrivacyInfo.xcprivacy'))).toBe(true); + }); + describe.each(Object.entries(CONFIGS))('with %s', (_label, config) => { it('evaluates and assigns every attribute the build depends on', () => { const assigned = assignedAttributes(config); diff --git a/packages/react-native-executorch/ios/PrivacyInfo.xcprivacy b/packages/react-native-executorch/ios/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..f8466df6a1 --- /dev/null +++ b/packages/react-native-executorch/ios/PrivacyInfo.xcprivacy @@ -0,0 +1,36 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeProductInteraction + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + + + + + diff --git a/packages/react-native-executorch/react-native-executorch.podspec b/packages/react-native-executorch/react-native-executorch.podspec index a412d21a42..d3e0f38a33 100644 --- a/packages/react-native-executorch/react-native-executorch.podspec +++ b/packages/react-native-executorch/react-native-executorch.podspec @@ -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