When I run the following line trying to build a non Expo React Native app for iOS using EAS Build I get an error “Could not find target with id ‘undefined’ in project.pbxproj”. I’m sure it’s just a config error, but I’m not sure where the ‘undefined’ is pulling from. Any help would be greatly appreciated.
eas build --platform ios --profile staging
The response I get is as follows:
Loaded "env" configuration for the "staging" profile: REACT_APP_ENVIRONMENT, RECEIPT_URL_STAGE, RECEIPT_URL_PROD, NO_FLIPPER, APP_IDENTIFIER, EXPIRED_COOKIE. Learn more: https://docs.expo.dev/build-reference/variables/
» ios: paths-project-pbxproj: Found multiple project.pbxproj file paths, using "ios/XXXX.xcodeproj/project.pbxproj". Ignored paths: ["ios/PBXXXX/PBXXXX.xcodeproj/project.pbxproj"]
» ios: paths-project-pbxproj: Found multiple project.pbxproj file paths, using "ios/XXXX.xcodeproj/project.pbxproj". Ignored paths: ["ios/PBXXXX/PBXXXX.xcodeproj/project.pbxproj"]
» ios: paths-project-pbxproj: Found multiple project.pbxproj file paths, using "ios/XXXX.xcodeproj/project.pbxproj". Ignored paths: ["ios/PBXXXX/PBXXXX.xcodeproj/project.pbxproj"]
» ios: paths-project-pbxproj: Found multiple project.pbxproj file paths, using "ios/XXXX.xcodeproj/project.pbxproj". Ignored paths: ["ios/PBXXXX/PBXXXX.xcodeproj/project.pbxproj"]
» ios: paths-project-pbxproj: Found multiple project.pbxproj file paths, using "ios/XXXX.xcodeproj/project.pbxproj". Ignored paths: ["ios/PBXXXX/PBXXXX.xcodeproj/project.pbxproj"]
Could not find target with id 'undefined' in project.pbxproj
Error: build command failed.
My eas.json file is as follows:
{
"cli": {
"version": ">= 10.2.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"scheme": "Development",
"cocoapods": "1.14.3"
}
},
"staging": {
"distribution": "internal",
"env": {
"REACT_APP_ENVIRONMENT": "stage",
"RECEIPT_URL_STAGE": "https://xxxx/stage/api/receipt",
"RECEIPT_URL_PROD": "https://xxxx/prod/api/receipt",
"NO_FLIPPER": "true",
"APP_IDENTIFIER": "com.xxxx.iphone.stage",
"EXPIRED_COOKIE": "xxxx"
},
"ios": {
"scheme": "Staging",
"cocoapods": "1.14.3"
}
},
"production": {
"env": {
"REACT_APP_ENVIRONMENT": "production",
"RECEIPT_URL_STAGE": "https://xxxx/stage/api/receipt",
"RECEIPT_URL_PROD": "https://xxxx/prod/api/receipt",
"NO_FLIPPER": "true",
"APP_IDENTIFIER": "com.xxxx.iphone"
},
"ios": {
"scheme": "Production",
"cocoapods": "1.14.3"
}
}
},
"submit": {
"production": {}
}
}