From 5fb2ac336a7531ba8156d3db4099f42b4936ce1a Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Sat, 26 Sep 2026 09:29:24 +0800 Subject: [PATCH] fix(ios): derive the pod deployment target from React Native The privacy manifest ships as a resource bundle (10.56.0), and CocoaPods gives that bundle target the podspec's platform version. React Native's post_install raises the deployment target of pod targets but not of resource bundle targets, so the hard-coded 11.0 stayed there. Xcode 27 supports iOS 15.0+ only and fails the build on that target: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 15.0 to 27.0.x. (in target 'react-native-update-react-native-update_privacy') Use React Native's min_ios_version_supported (what library templates use), which never exceeds the app's own target; fall back to 11.0 when a Podfile does not load react_native_pods.rb. Expo projects keep the target parsed from ExpoModulesCore. Co-Authored-By: Claude Opus 5.5 --- react-native-update.podspec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/react-native-update.podspec b/react-native-update.podspec index f7f0a3ad..76037a2a 100644 --- a/react-native-update.podspec +++ b/react-native-update.podspec @@ -43,7 +43,13 @@ Pod::Spec.new do |s| end # Set platform based on whether it's a valid Expo project and if we can parse its target - final_ios_deployment_target = '11.0' # Default target + # React Native's own minimum (defined by react_native_pods.rb, which the + # Podfile loads before evaluating podspecs). The pod platform version also + # becomes the deployment target of the privacy resource bundle target, + # which React Native's post_install does not raise: Xcode 27 rejects + # anything below 15.0 there, so a hard-coded 11.0 fails the build. + final_ios_deployment_target = + defined?(min_ios_version_supported) ? min_ios_version_supported : '11.0' if valid_expo_project # --- Try to find and parse ExpoModulesCore.podspec only if it's an Expo project ---