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 myiosandandroidfolderscd iospod install- Open the
iosdirectory in Xcode and configure my signing and build settings - Create a
Gymfilein theiosdirectory with the necessary details fastlane gym- This then gives me my
.ipafile 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.
You can also update it on each pod using a post_install hook, something like this:
After adding the above code execute the below command