Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build fails due to 11 target instead of 12 #11

Open
norbertschuler opened this issue Apr 29, 2023 · 0 comments
Open

iOS build fails due to 11 target instead of 12 #11

norbertschuler opened this issue Apr 29, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@norbertschuler
Copy link
Collaborator

We are currently using a patch in our Podfile named __apply_Xcode_12_5_M1_post_install_workaround which set the IPHONEOS_DEPLOYMENT_TARGET to 11 for all Pods using a lower target. Unfortunately for my latest Xcode Version 14.3 on M1 architecture the build fails with missing 'butter/map.h' file not found until I set the Pods target to 12 at minimum.

I changed the file node_modules/react-native/scripts/react_native_pods.rb containing the patch to this code (just exchanging 11 to 12) - I have not yet found a good way to persist this change for our repository:

...
def __apply_Xcode_12_5_M1_post_install_workaround(installer)
  # Flipper podspecs are still targeting an older iOS deployment target, and may cause an error like:
  #   "error: thread-local storage is not supported for the current target"
  # The most reliable known workaround is to bump iOS deployment target to match react-native (iOS 11 now).
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 12.0
      deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f
      should_upgrade = deployment_target < 12.0 && deployment_target != 0.0
      if should_upgrade
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      end
    end
  end
...
@norbertschuler norbertschuler added the bug Something isn't working label Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants