skip to Main Content

I am trying to build my React Native app for iOS and having issues.

I build on a regular basis, but since upgrading Xcode to 15.0.1, I have run into an issue.

I build my app for iOS as follows:

  • npx expo prebuild -> generates my ios and android folders
  • cd ios
  • pod install
  • Open the ios directory in Xcode and configure my signing and build settings
  • Create a Gymfile in the ios directory with the necessary details
  • fastlane gym
  • This then gives me my .ipa file which I then upload to TestFlight

However, since the upgrade, when I run fastlane gym, it fails, with multiple logs relating to my Podfiles targeting an invalid version of iOS, these look like this:

warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to ...

I have tried various things to resolve this, including changes to my Podfile, and setting the platform :ios, to be podfile_properties['ios.deploymentTarget'] if the value exists and is greater or equal to 12.0, else set it to 12.0.

I also tried manually changing the deployment target in each of the Pods in Xcode, but I have not had any success yet.

I also tried adding:

"plugins": [
  [
    "expo-build-properties",
    {
      "ios": {
        "deploymentTarget": "13.0"
      }
    }
  ]
],

to my app.config.js, but this also didn’t fix my issue.

2

Answers


  1. Chosen as BEST ANSWER

    I have managed to solve my issue by upgrading to Expo 49, I was previously using Expo 47. My iOS builds now succeed, although my Android builds have started to fail.


  2. You can also update it on each pod using a post_install hook, something like this:

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
        end
      end
    end
    

    After adding the above code execute the below command

    pod install
    npx expo prebuild --clean
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search