My build crashes when running with
eas build --profile production --platform ios
But not with expo run:ios
eas.json:
{
"cli": {
"version": ">= 0.60.0",
"appVersionSource": "remote"
},
"build": {
"local": {
"developmentClient": false,
"env": {
"APP_ENV": "dev"
},
"ios": {
"simulator": true
}
},
"development": {
"developmentClient": true,
"distribution": "internal",
"env": {
"APP_ENV": "dev"
}
},
"preview": {
"developmentClient": false,
"distribution": "internal",
"env": {
"APP_ENV": "prod"
},
"ios": {
"image": "macos-sequoia-15.3-xcode-16.2"
}
},
"production": {
"developmentClient": false,
"env": {
"APP_ENV": "prod"
},
"autoIncrement": true,
"ios": {
"image": "macos-sequoia-15.3-xcode-16.2",
"simulator": true
}
}
}
}
What could the issue be?
The issue was that the production environment variables were not set up in my Expo account. I set them here and the crash resolved.
https://docs.expo.dev/eas/environment-variables/#create-environment-variables