From ce61b6e766162aac577a84f36789fcf75331ae3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20S=C5=82uszniak?= Date: Thu, 5 Nov 2026 17:37:11 +0100 Subject: [PATCH] fix(ios): restore the privacy manifest dropped in 0.10 0.8.5 and 0.9.3 shipped ios/PrivacyInfo.xcprivacy as the RnExecutorchPrivacyInfo resource bundle; the rewrite podspec never carried it over. The current binaries have the same required-reason profile as the 0.9 audit (stat/fstat, sysctl on hw.* and machdep.* only), and telemetry still sends product-interaction data, so the manifest is restored unchanged. Closes #1616 --- .../__tests__/api/podspecAttributes.test.ts | 6 ++++ .../ios/PrivacyInfo.xcprivacy | 36 +++++++++++++++++++ .../react-native-executorch.podspec | 5 +++ 3 files changed, 47 insertions(+) create mode 100644 packages/react-native-executorch/ios/PrivacyInfo.xcprivacy 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