Skip to content

Commit

Permalink
[expo] app store submission fix
Browse files Browse the repository at this point in the history
**Summary**

^^

**Test**

- N/A

**Issue**

- N/A
  • Loading branch information
yssk22 committed Dec 23, 2024
1 parent b6a2ea5 commit aae95ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/eas-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ jobs:
if: ${{ matrix.target != 'dev' }}
env:
HPAPP_CONFIG_NAME: ${{ matrix.target }}
EXPO_APPLE_APP_SPECIFIC_PASSWORD: ${{ secret.EXPO_APPLE_APP_SPECIFIC_PASSWORD }}
17 changes: 4 additions & 13 deletions expo/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,18 @@ module.exports = (_) => {
config.splash.image = path.join('config', cfgName, 'splash.png');

const isEAS = process.env.EAS_BUILD === 'true';
const easEnvvarPrefix = cfgName.toUpperCase() + '_';
const iosGoogleServicesFilePath = isEAS
? process.env[easEnvvarPrefix + 'GOOGLE_SERVICES_INFO_PLIST']
: path.join('config', cfgName, 'GoogleService-Info.plist');
const androidGoogleServicesFilePath = isEAS
? process.env[easEnvvarPrefix + 'GOOGLE_SERVICES_JSON']
: path.join('config', cfgName, 'google-services.json');
const iosGoogleServicesFilePath = path.join('config', cfgName, 'GoogleService-Info.plist');
const androidGoogleServicesFilePath = path.join('config', cfgName, 'google-services.json');

if (fs.existsSync(iosGoogleServicesFilePath)) {
config.ios.googleServicesFile = iosGoogleServicesFilePath;
} else {
if (isEAS) {
throw new Error('GoogleService-Info.plist file does not found in ' + iosGoogleServicesFilePath);
}
throw new Error('GoogleService-Info.plist file does not found in ' + iosGoogleServicesFilePath);
}
if (fs.existsSync(androidGoogleServicesFilePath)) {
config.android.googleServicesFile = androidGoogleServicesFilePath;
} else {
if (isEAS) {
throw new Error('google-services.json file does not found in ' + androidGoogleServicesFilePath);
}
throw new Error('google-services.json file does not found in ' + androidGoogleServicesFilePath);
}

// finally load the environment specific app.config.js
Expand Down

0 comments on commit aae95ac

Please sign in to comment.