expo / expo/eas-cli

EAS cli unable to read bundle identifier and other environment variables in `.pbxproj` file

Open
#2,773 2 comments 1 reaction 0 assignees View on GitHub
eas build needs review
Dominant language
TypeScript
Stars
1.4k
Forks
236
Avg merge
3d 1h
Merged PRs (30d)
91

Description

### Build/Submit details page URL

_No response_

### Summary

In my bareworkflow app, I am trying to run `eas build --profile development`,
The build does not start at all on `expo.dev`, because of validation error below:

I get error with:
```
Could not read bundle identifier from Xcode project (target = myappname, build configuration = Release).
```
The reason is that value of app bundle identifier in the `.pbxproj` file is
```
PRODUCT_BUNDLE_IDENTIFIER = "$(EXPO_PUBLIC_APP_BUNDLE_ID)";
```
This is because we still rely on `react-native-config` related `.env` file which holds value for `EXPO_PUBLIC_APP_BUNDLE_ID`, before we fully adopt CNG/prebuild.

Note: I am not ignoring `.env` as part of `.easignore`.

contents of my `eas.json`
```
{
"cli": {
"version": ">= 12.5.0",
"appVersionSource": "local"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"channel": "development",
"ios": {
"enterpriseProvisioning": "universal"
}
},
"preview": {
"distribution": "internal",
"environment": "preview",
"channel": "preview",
"ios": {
"enterpriseProvisioning": "universal"
}
},
"production": {
"autoIncrement": true,
"channel": "production"
}
},
"submit": {
"production": {}
}
}

```

### Managed or bare?

bare

### Environment

```
expo-env-info 1.2.0 environment info:
System:
OS: macOS 15.1.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
Yarn: 1.18.0 - ~/.yarn/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
Watchman: 2024.10.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.14.3 - /Users/jshah/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.0, iOS 18.0, macOS 15.0, tvOS 18.0, visionOS 2.0, watchOS 11.0
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode: 16.0/16A242d - /usr/bin/xcodebuild
npmPackages:
@expo/metro-config: 0.18.11 => 0.18.11
expo: 50.0.20 => 50.0.20
react: 18.2.0 => 18.2.0
react-native: 0.73.9 => 0.73.9
npmGlobalPackages:
eas-cli: 13.4.2
expo-cli: 6.3.10
Expo Workflow: bare
```

### Error output

Could not read bundle identifier from Xcode project (target = myappname, build configuration = Release).

### Reproducible demo or steps to reproduce from a blank project

eas build --profile development

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.