Skip to content

Commit

Permalink
Fix error when pod has no IPHONEOS_DEPLOYMENT_TARGET (#32746)
Browse files Browse the repository at this point in the history
Summary:
Co-Authored-By: William Bell <williambell9708@outlook.com>

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
  • Loading branch information
Yonom authored and facebook-github-bot committed Dec 14, 2021
1 parent 312efd0 commit 9cd4092
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ def __apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# ensure IPHONEOS_DEPLOYMENT_TARGET is at least 11.0
should_upgrade = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].split('.')[0].to_i < 11
deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f
should_upgrade = deployment_target < 11.0 && deployment_target != 0.0
if should_upgrade
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
Expand Down

0 comments on commit 9cd4092

Please sign in to comment.