Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions EAS_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ npx eas-cli env:delete SECRET_NAME
- `EXPO_PUBLIC_GOOGLE_AUTH_REDIRECT_URI`
- `EXPO_PUBLIC_GOOGLE_CLIENT_ID`
- `GOOGLE_MAPS_API_KEY` (secret)
- `GOOGLE_SERVICES_JSON` (file secret — Android Firebase config)
- `GOOGLE_SERVICE_INFO_PLIST` (file secret — iOS Firebase config)
- `ANDROID_GOOGLE_SERVICES` (file secret — Android Firebase config, production only)
- `IOS_GOOGLE_SERVICES` (file secret — iOS Firebase config, production only)

> **Note:** Local `.env` file is NOT used in EAS builds - only for `expo start`

Expand All @@ -91,25 +91,23 @@ npx eas-cli env:delete SECRET_NAME

```bash
# Android
npx eas-cli env:create --scope project --name GOOGLE_SERVICES_JSON --type file --value ./google-services.json --environment development
npx eas-cli env:create --scope project --name GOOGLE_SERVICES_JSON --type file --value ./google-services.json --environment preview
npx eas-cli env:create --scope project --name GOOGLE_SERVICES_JSON --type file --value ./google-services.json --environment production
npx eas-cli env:create --scope project --name ANDROID_GOOGLE_SERVICES --type file --value ./google-services.json --environment production

# iOS
npx eas-cli env:create --scope project --name GOOGLE_SERVICE_INFO_PLIST --type file --value ./GoogleService-Info.plist --environment development
npx eas-cli env:create --scope project --name GOOGLE_SERVICE_INFO_PLIST --type file --value ./GoogleService-Info.plist --environment preview
npx eas-cli env:create --scope project --name GOOGLE_SERVICE_INFO_PLIST --type file --value ./GoogleService-Info.plist --environment production
npx eas-cli env:create --scope project --name IOS_GOOGLE_SERVICES --type file --value ./GoogleService-Info.plist --environment production
```

**`app.config.js` must reference the secrets** (already updated):
```js
// Android
googleServicesFile: process.env.GOOGLE_SERVICES_JSON ?? "./google-services.json",
googleServicesFile: process.env.ANDROID_GOOGLE_SERVICES ?? "./google-services.json",

// iOS
googleServicesFile: process.env.GOOGLE_SERVICE_INFO_PLIST ?? "./GoogleService-Info.plist",
googleServicesFile: process.env.IOS_GOOGLE_SERVICES ?? "./GoogleService-Info.plist",
```

These secrets only exist for the `production` environment — `development` and `preview` builds fall back to the local gitignored files.

Locally (during `expo start`) the files are read directly from disk. On EAS the env var path is used.

## Installation
Expand Down
6 changes: 3 additions & 3 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
name: "#local",
slug: "hashtaglocal",
owner: "smalltech",
version: "1.0.8",
version: "1.0.9",
orientation: "portrait",
icon: "./assets/app-icon.png",
scheme: "hashtaglocal",
Expand All @@ -49,7 +49,7 @@ export default {
ios: {
supportsTablet: true,
googleServicesFile:
process.env.GOOGLE_SERVICE_INFO_PLIST ?? "./GoogleService-Info.plist",
process.env.IOS_GOOGLE_SERVICES ?? "./GoogleService-Info.plist",
bundleIdentifier: "com.smalltech.hashtaglocal",
buildNumber: "2",
usesAppleSignIn: true,
Expand Down Expand Up @@ -78,7 +78,7 @@ export default {
edgeToEdgeEnabled: true,
predictiveBackGestureEnabled: false,
googleServicesFile:
process.env.GOOGLE_SERVICES_JSON ?? "./google-services.json",
process.env.ANDROID_GOOGLE_SERVICES ?? "./google-services.json",
package: "com.smalltech.hashtaglocal",
permissions: [
"android.permission.POST_NOTIFICATIONS",
Expand Down
6 changes: 1 addition & 5 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@
"environment": "production",
"autoIncrement": true,
"channel": "production",
"android": {
"googleServicesFile": "env:ANDROID_GOOGLE_SERVICES"
},
"ios": {
"buildConfiguration": "Release",
"googleServicesFile": "env:IOS_GOOGLE_SERVICES"
"buildConfiguration": "Release"
}
}
},
Expand Down