Skip to content

Commit 9cd4092

Browse files
Yonomfacebook-github-bot
authored andcommitted
Fix error when pod has no IPHONEOS_DEPLOYMENT_TARGET (#32746)
Summary: Co-Authored-By: William Bell <[email protected]> If one of the pods has no IPHONEOS_DEPLOYMENT_TARGET, the M1 postinstall workaround script fails. This commit updates the code to handle this special case. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - __apply_Xcode_12_5_M1_post_install_workaround failing when one of the Pods has no IPHONEOS_DEPLOYMENT_TARGET set Pull Request resolved: #32746 Test Plan: reactwg/react-native-releases#6 (reply in thread) Reviewed By: charlesbdudley Differential Revision: D33063717 Pulled By: lunaleaps fbshipit-source-id: f45bc47c85e42ffb5c37a277fbedd48a729ef5fb
1 parent 312efd0 commit 9cd4092

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/react_native_pods.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,8 @@ def __apply_Xcode_12_5_M1_post_install_workaround(installer)
584584
installer.pods_project.targets.each do |target|
585585
target.build_configurations.each do |config|
586586
# ensure IPHONEOS_DEPLOYMENT_TARGET is at least 11.0
587-
should_upgrade = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].split('.')[0].to_i < 11
587+
deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f
588+
should_upgrade = deployment_target < 11.0 && deployment_target != 0.0
588589
if should_upgrade
589590
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
590591
end

0 commit comments

Comments
 (0)