From d799e3046d8b743a19fc585e7c6ecc9a92d14b4e Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Mon, 3 Apr 2023 13:27:43 -0700 Subject: [PATCH] [C-2404] Fix ios build on xcode 14.3 (#3146) --- packages/mobile/ios/Podfile | 21 ++++++++++++++++++++- packages/mobile/ios/Podfile.lock | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/mobile/ios/Podfile b/packages/mobile/ios/Podfile index c90c7db2df6..8f9d6b2d919 100644 --- a/packages/mobile/ios/Podfile +++ b/packages/mobile/ios/Podfile @@ -58,6 +58,7 @@ target 'AudiusReactNative' do :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) + __apply_Xcode_14_3_RC_post_install_workaround(installer) installer.pods_project.build_configurations.each do |config| @@ -73,4 +74,22 @@ target 'AudiusReactNative' do end end end -end \ No newline at end of file +end + +# https://github.com/facebook/react-native/commit/cb88e75cf1f82af94e35f1647f6b6d0b0dbbe60f +# https://github.com/travis-mark/lrn/commit/015854716feadd61a904d5a603b027426472f863 +# Force pods to match minimum iOS version for React Native +# Fixes build issue on Xcode Cloud where some pods +# Use iOS 12 calls despite being set as iOS 11 +def __apply_Xcode_14_3_RC_post_install_workaround(installer) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + minimum_target = min_ios_version_supported + if current_target.to_f < minimum_target.to_f + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target + end + end + end +end + diff --git a/packages/mobile/ios/Podfile.lock b/packages/mobile/ios/Podfile.lock index ea8a8c756b7..539f71ffd65 100644 --- a/packages/mobile/ios/Podfile.lock +++ b/packages/mobile/ios/Podfile.lock @@ -1200,6 +1200,6 @@ SPEC CHECKSUMS: Yoga: 5ed1699acbba8863755998a4245daa200ff3817b YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: e5d6450acb3370a25a796e24c0b62788c0ec984e +PODFILE CHECKSUM: 78cdf226103f577ea16b8c2f2aecf246eefc2a97 COCOAPODS: 1.11.3