Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GoogleService-Info.plist to bare-expo #6934

Merged
merged 4 commits into from Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -74,6 +74,7 @@ jarjar-rules.txt
/android/expoview/src/main/java/host/exp/exponent/generated/ExponentKeys.java
/android/app/fabric.properties
/apps/bare-expo/android/app/google-services.json
/apps/bare-expo/ios/BareExpo/GoogleService-Info.plist
/ios/Exponent/Generated/EXKeys.h
/ios/ExponentIntegrationTests/EXTestEnvironment.plist
/exponent-view-template/ios/Podfile
Expand Down
40 changes: 39 additions & 1 deletion apps/bare-expo/ios/BareExpo.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -exo pipefail

SRC_FILE="${PROJECT_DIR}/BareExpo/GoogleService-Info.plist"
DST_FILE="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
if [ -f $SRC_FILE ]; then
if [[ $(grep -L "NO_CLIENT_ID" "$SRC_FILE") ]]; then
cp -r "$SRC_FILE" "$DST_FILE"
fi
fi
12 changes: 12 additions & 0 deletions apps/bare-expo/ios/Build-Phases/generate-dynamic-macros.sh
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -exo pipefail

if [ -z "$EXPO_TOOLS_DIR" ]; then
EXPO_TOOLS_DIR="${SRCROOT}/../../../tools"
fi

source ${EXPO_TOOLS_DIR}/source-login-scripts.sh
export PATH="${SRCROOT}/../../../bin:$PATH"

et ios-generate-dynamic-macros --configuration ${CONFIGURATION}
Binary file modified secrets/keys.json
Binary file not shown.
Expand Up @@ -8,15 +8,15 @@
"client": [
{
"client_info": {
"mobilesdk_app_id": "${BARE_EXPO_FIREBASE_GOOGLE_APP_ID}",
"mobilesdk_app_id": "${BARE_EXPO_FIREBASE_ANDROID_GOOGLE_APP_ID}",
"android_client_info": {
"package_name": "${BARE_EXPO_FIREBASE_BUNDLE_ID}"
"package_name": "${BARE_EXPO_FIREBASE_ANDROID_BUNDLE_ID}"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "${BARE_EXPO_FIREBASE_ANDROID_KEY}"
"current_key": "${BARE_EXPO_FIREBASE_ANDROID_API_KEY}"
}
],
"services": {}
Expand Down
3 changes: 2 additions & 1 deletion template-files/ios-paths.json
@@ -1,3 +1,4 @@
{
"GoogleService-Info.plist": "ios/Exponent/Supporting/"
"GoogleService-Info.plist": "ios/Exponent/Supporting/",
"bare-expo/ios/BareExpo/GoogleService-Info.plist": "apps/"
}
36 changes: 36 additions & 0 deletions template-files/ios/bare-expo/ios/BareExpo/GoogleService-Info.plist
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>${BARE_EXPO_FIREBASE_IOS_CLIENT_ID}</string>
<key>REVERSED_CLIENT_ID</key>
<string>${BARE_EXPO_FIREBASE_IOS_REVERSED_CLIENT_ID}</string>
<key>API_KEY</key>
<string>${BARE_EXPO_FIREBASE_IOS_API_KEY}</string>
<key>GCM_SENDER_ID</key>
<string>${BARE_EXPO_FIREBASE_GCM_SENDER_ID}</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>${BARE_EXPO_FIREBASE_IOS_BUNDLE_ID}</string>
<key>PROJECT_ID</key>
<string>${BARE_EXPO_FIREBASE_PROJECT_ID}</string>
<key>STORAGE_BUCKET</key>
<string>${BARE_EXPO_FIREBASE_STORAGE_BUCKET}</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>${BARE_EXPO_FIREBASE_IOS_GOOGLE_APP_ID}</string>
<key>FIREBASE_DATABASE_URL</key>
<string>${BARE_EXPO_FIREBASE_DATABASE_URL}</string>
</dict>
</plist>
15 changes: 12 additions & 3 deletions template-files/keys.json
Expand Up @@ -25,7 +25,16 @@
"FIREBASE_STORAGE_BUCKET": "",
"FIREBASE_GOOGLE_APP_ID": "",
"FIREBASE_DATABASE_URL": "",
"BARE_EXPO_FIREBASE_GOOGLE_APP_ID": "1:300000000000:android:0000000000000000",
"BARE_EXPO_FIREBASE_BUNDLE_ID": "dev.expo.payments",
"BARE_EXPO_FIREBASE_ANDROID_KEY": ""
"BARE_EXPO_FIREBASE_DATABASE_URL": "",
"BARE_EXPO_FIREBASE_STORAGE_BUCKET": "",
"BARE_EXPO_FIREBASE_PROJECT_ID": "",
"BARE_EXPO_FIREBASE_GCM_SENDER_ID": "",
"BARE_EXPO_FIREBASE_ANDROID_BUNDLE_ID": "dev.expo.payments",
"BARE_EXPO_FIREBASE_ANDROID_GOOGLE_APP_ID": "1:300000000000:android:0000000000000000",
"BARE_EXPO_FIREBASE_ANDROID_API_KEY": "",
"BARE_EXPO_FIREBASE_IOS_BUNDLE_ID": "dev.expo.Payments",
"BARE_EXPO_FIREBASE_IOS_CLIENT_ID": "NO_CLIENT_ID",
"BARE_EXPO_FIREBASE_IOS_REVERSED_CLIENT_ID": "",
"BARE_EXPO_FIREBASE_IOS_API_KEY": "",
"BARE_EXPO_FIREBASE_IOS_GOOGLE_APP_ID": ""
}