From c8fd852eca5c66d3f37730878860b5824b900afd Mon Sep 17 00:00:00 2001 From: devthejo Date: Sun, 8 Feb 2026 11:58:55 +0100 Subject: [PATCH] fix(ios): up react-native-background-geolocation --- app.config.js | 1 + ios/Podfile | 31 ++++++++++++++----------------- ios/Podfile.lock | 14 +++++++------- ios/Podfile.properties.json | 1 + 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/app.config.js b/app.config.js index f77d0e1..1fc34b5 100644 --- a/app.config.js +++ b/app.config.js @@ -179,6 +179,7 @@ let config = { { ios: { useFrameworks: "static", + deploymentTarget: "15.1", }, android: { enableProguardInReleaseBuilds: true, diff --git a/ios/Podfile b/ios/Podfile index 627a139..052a50a 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -8,7 +8,8 @@ podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0' ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR'] -platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1' +ios_deployment_target = podfile_properties['ios.deploymentTarget'] || '15.1' +platform :ios, ios_deployment_target install! 'cocoapods', :deterministic_uuids => false @@ -59,6 +60,17 @@ target 'AlerteSecours' do :ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true', ) + # Ensure every Pods target uses an iOS deployment target compatible with our app. + # Fixes issues like Pods targets defaulting to iOS 9.0, which can block newer pod versions. + min_ios_version = Gem::Version.new(ios_deployment_target) + installer.pods_project.targets.each do |t| + t.build_configurations.each do |config| + current = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + next if current && Gem::Version.new(current) >= min_ios_version + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_deployment_target + end + end + # This is necessary for Xcode 14, because it signs resource bundles by default # when building for devices. installer.target_installation_results.pod_target_installation_results @@ -130,21 +142,6 @@ target 'AlerteSecours' do end end - # Fix CocoaPods xcconfig merge error for expo-dev-menu subspec targets. - # CocoaPods sometimes generates different DEFINES_MODULE values for these targets, - # which breaks `pod install` when it tries to merge xcconfigs. - expo_dev_menu_targets = %w[ - expo-dev-menu - Main - ReactNativeCompatibles - SafeAreaView - Vendored - ] - installer.pods_project.targets.each do |t| - next unless expo_dev_menu_targets.include?(t.name) - t.build_configurations.each do |config| - config.build_settings['DEFINES_MODULE'] = 'YES' - end - end + end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2c88326..f58916b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2178,7 +2178,7 @@ PODS: - React-logger (= 0.79.6) - React-perflogger (= 0.79.6) - React-utils (= 0.79.6) - - RNBackgroundGeolocation (5.0.1): + - RNBackgroundGeolocation (5.0.3): - CocoaLumberjack (~> 3.8.5) - DoubleConversion - glog @@ -2202,7 +2202,7 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - TSLocationManager (~> 4.0.0) + - TSLocationManager (~> 4.0.10) - Yoga - RNCAsyncStorage (2.1.2): - React-Core @@ -2458,7 +2458,7 @@ PODS: - SocketRocket (0.7.1) - TOCropViewController (2.8.0) - TSBackgroundFetch (4.0.6) - - TSLocationManager (4.0.9): + - TSLocationManager (4.0.14): - TSBackgroundFetch (~> 4.0.6) - UMAppLoader (5.1.3) - Yoga (0.0.0) @@ -2883,7 +2883,7 @@ SPEC CHECKSUMS: Expo: ffa073320103615dfec9957a071ba949671a7d5d expo-dev-client: 9b1e78baf0dd87b005f035d180bbb07c05917fad expo-dev-launcher: e240b09f9fef555916cc71feb30ef5cfaf23f257 - expo-dev-menu: 726077cd701594a14227043186369d86bbade0d9 + expo-dev-menu: 70ab57ecc6e329d204b7213741edd087c047bd2a expo-dev-menu-interface: 609c35ae8b97479cdd4c9e23c8cf6adc44beea0e ExpoAsset: ef06e880126c375f580d4923fdd1cdf4ee6ee7d6 ExpoAudio: d98f922b17a945cd33f8462d086278dbd810c537 @@ -2995,7 +2995,7 @@ SPEC CHECKSUMS: ReactAppDependencyProvider: ae0be24eb18014a031b4b220cb3973d07c3cbaf8 ReactCodegen: 3d5c9def468f7df3b90b05d3098ab8d47d76c62e ReactCommon: 4c22936ee38ecf885efc95ac5832f430f27e0271 - RNBackgroundGeolocation: a1a22b12ae92306d46150b9827cc1421ec03bd18 + RNBackgroundGeolocation: 2bb5dd0cffeded69d8e21ff31bfa436efcea0636 RNCAsyncStorage: b9f5f78da5d16a853fe3dc22e8268d932fc45a83 RNCMaskedView: 473e5fa854913eff0eef18c09b1328e60b3bf3f7 RNFBApp: 8d27c7545e7e06d78974e204ff95f207a60a5cb2 @@ -3012,10 +3012,10 @@ SPEC CHECKSUMS: SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 TOCropViewController: 797deaf39c90e6e9ddd848d88817f6b9a8a09888 TSBackgroundFetch: 0afbeaae4e1132866e1d4b6e55265af26b5958ae - TSLocationManager: ba5648de9d7226abca875a06fbce7f50b3e9acf5 + TSLocationManager: 6b8551c21b6faa56513cbb6ae4d62676ac395f34 UMAppLoader: 55159b69750129faa7a51c493cb8ea55a7b64eb9 Yoga: b37eeaa6148984cac70ecaf8022bb209e03296cb -PODFILE CHECKSUM: 5686979b0aa88a157955165df52d1be990eeb6e7 +PODFILE CHECKSUM: a1c54f1927fec0924191f99a3828a87fd3089a31 COCOAPODS: 1.16.2 diff --git a/ios/Podfile.properties.json b/ios/Podfile.properties.json index 1a90e79..a1fb3c2 100644 --- a/ios/Podfile.properties.json +++ b/ios/Podfile.properties.json @@ -2,6 +2,7 @@ "expo.jsEngine": "hermes", "EX_DEV_CLIENT_NETWORK_INSPECTOR": "true", "newArchEnabled": "false", + "ios.deploymentTarget": "15.1", "ios.useFrameworks": "static", "apple.extraPods": "[]", "apple.ccacheEnabled": "false",