React Native iOS Build is failing with expo

I am getting below error while running the below command to generate the iOS build:

eas build --platform ios

Error:

iOS build failed: Some pods require a higher minimum deployment target. You can use the expo-build-properties config plugin (BuildProperties - Expo Documentation) to override the default native build properties and set a different minimum deployment target.

I have already add required settings in my app.json file, below is my app.json file code:

{
  "expo": {
    "name": "*****",
    "slug": "*****",
    "version": "1.1.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0,
      "url": "*****"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "*****",
      "deploymentTarget": "13.0",
      "buildNumber": "1.1.0"
    },
    "android": {
      "package": "*****",
      "versionCode": 2,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": [
      [
        "expo-build-properties",
        {
          "ios": {
            "minimumOSVersion": "12.0"
          }
        }
      ]
    ],
    "extra": {
      "eas": {
        "projectId": "*****"
      }
    },
    "runtimeVersion": {
      "policy": "sdkVersion"
    }
  }
}

Let me know where am I wrong ?

Hi @neetesh

You need to put the deploymentTarget into the params for the expo-build-properties config plugin. Like in the example here: BuildProperties - Expo Documentation

Not in the main ios section of app.json.

So instead of where you have minimumOSVersion, which is not a valid option.

Here are the valid options:

@wodin Thanks for the revert.

Unfortunately, I am still facing the same issue and not able to create build for iOS.

Can you suggest any other way to create build for iOS ?

Below is my updated app.json:

{
  "expo": {
    "name": "*******",
    "slug": "*******",
    "version": "1.1.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0,
      "url": "******"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "com.*******",
      "buildNumber": "1.1.0"
    },
    "android": {
      "package": "com.*******",
      "versionCode": 2,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": [
      [
        "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "13.0"
          }
        }
      ]
    ],
    "extra": {
      "eas": {
        "projectId": "*****"
      }
    },
    "runtimeVersion": {
      "policy": "sdkVersion"
    }
  }
}

app.config.js file || Do we need this or not ?

module.exports = {
    expo: {
    "name": "*****",
    "slug": "*****",
    "version": "1.1.0",
      ios: {
        bundleIdentifier: 'com.*****',
        buildProperties: {
          ENABLE_BITCODE: false,
          IPHONEOS_DEPLOYMENT_TARGET: '12.0',
        },
      },
      android: {
        package: 'com.*****',
      },
      "extra": {
        "eas": {
          "projectId": "*****"
        }
      },
    },
};
  

Hi

Your app.json looks OK to me.

By default there is only an app.json. You don’t need an app.config.js. It’s possible to replace app.json with app.config.js, or augment app.json with app.config.js.

In your case I believe your app.json will be ignored because it just exports an object. If you wanted to augment app.json you would need to export a function that gets the config as a parameter as shown here: Dynamic configuration

So your app.config.js looks like it’s overriding app.json instead of extending it, but you don’t have the plugins section. I am pretty sure that the ENABLE_BITCODE and IPHONEOS_DEPLOYMENT_TARGET stuff will be ignored because it’s not in the right place and it’s using IPHONEOS_DEPLOYMENT_TARGET as the key instead of “deploymentTarget”

tl;dr delete app.config.js

@wodin : Thank you so much for your kind help.

I am able to run the build now :slight_smile:

Appreciated.

1 Like

Hi @wodin,

I am facing another issue related to app crash, can you please share your thoughts on that.

Few others are also facing the same issue.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.