From f662edd13527409c6972b54afc15f855ff3a5237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 25 Mar 2019 16:09:59 +0100 Subject: [PATCH] ios: don't bundle a dummy GoogleService-Info.plist file It complicates automated builds. --- .gitignore | 1 + ios/app/GoogleService-Info.plist | 28 --------------------------- ios/app/app.xcodeproj/project.pbxproj | 25 +++++++++++++++++++----- ios/app/src/FIRUtilities.m | 5 ----- 4 files changed, 21 insertions(+), 38 deletions(-) delete mode 100644 ios/app/GoogleService-Info.plist diff --git a/.gitignore b/.gitignore index 267f6721c..a16ce3352 100644 --- a/.gitignore +++ b/.gitignore @@ -87,4 +87,5 @@ android/.settings/org.eclipse.buildship.core.prefs android/app/dropbox.key android/app/google-services.json ios/app/dropbox.key +ios/app/GoogleService-Info.plist diff --git a/ios/app/GoogleService-Info.plist b/ios/app/GoogleService-Info.plist deleted file mode 100644 index 34800e2f2..000000000 --- a/ios/app/GoogleService-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - API_KEY - correct_api_key - TRACKING_ID - correct_tracking_id - CLIENT_ID - correct_client_id - REVERSED_CLIENT_ID - com.google.correct-reversed-client-id - GOOGLE_APP_ID - 1:123:ios:123abc - GCM_SENDER_ID - correct_gcm_sender_id - PLIST_VERSION - 1 - BUNDLE_ID - com.google.FirebaseSDKTests - PROJECT_ID - abc-xyz-123 - DATABASE_URL - https://abc-xyz-123.firebaseio.com - STORAGE_BUCKET - project-id-123.storage.firebase.com - - diff --git a/ios/app/app.xcodeproj/project.pbxproj b/ios/app/app.xcodeproj/project.pbxproj index b03851e2a..3e68da0ee 100644 --- a/ios/app/app.xcodeproj/project.pbxproj +++ b/ios/app/app.xcodeproj/project.pbxproj @@ -18,7 +18,6 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 695AF3ED6F686F9C5EE40F9A /* libPods-jitsi-meet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 489E8EFE2C720D10F5961AEF /* libPods-jitsi-meet.a */; }; - DE4C455E21DE1E4300EA0709 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DE4C455D21DE1E4300EA0709 /* GoogleService-Info.plist */; }; DE4C456121DE1E4E00EA0709 /* FIRUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */; }; /* End PBXBuildFile section */ @@ -55,7 +54,6 @@ 4670A512A688E2DC34528282 /* Pods-jitsi-meet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-jitsi-meet.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-jitsi-meet/Pods-jitsi-meet.debug.xcconfig"; sourceTree = ""; }; 489E8EFE2C720D10F5961AEF /* libPods-jitsi-meet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-jitsi-meet.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B3B083EB1D4955FF0069CEE7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = app.entitlements; sourceTree = ""; }; - DE4C455D21DE1E4300EA0709 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = SOURCE_ROOT; }; DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRUtilities.m; sourceTree = ""; }; DE4C456021DE1E4E00EA0709 /* FIRUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIRUtilities.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -91,7 +89,6 @@ 13B07FB01A68108700A75B9A /* AppDelegate.m */, DE4C456021DE1E4E00EA0709 /* FIRUtilities.h */, DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */, - DE4C455D21DE1E4300EA0709 /* GoogleService-Info.plist */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, @@ -149,6 +146,7 @@ 0B26BE701EC5BC3C00EEFB41 /* Embed Frameworks */, B35383AD1DDA0083008F406A /* Adjust embedded framework architectures */, 0BB7DA181EC9E695007AAE98 /* Adjust ATS */, + DEF4813D224925A2002AD03A /* Copy Google Plist file */, DEC2069321CBBD6900072F03 /* Setup Fabric */, DE11877A21EE09640078D059 /* Setup Google reverse URL handler */, DE4F6D6E22005C0400DE699E /* Setup Dropbox */, @@ -209,7 +207,6 @@ buildActionMask = 2147483647; files = ( 0B412F211EDEE95300B1A0A6 /* Main.storyboard in Resources */, - DE4C455E21DE1E4300EA0709 /* GoogleService-Info.plist in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, ); @@ -298,7 +295,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nREVERSED_CLIENT_ID=$(/usr/libexec/PlistBuddy -c \"Print :REVERSED_CLIENT_ID:\" $PROJECT_DIR/GoogleService-Info.plist)\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleURLTypes:1:CFBundleURLSchemes:0 $REVERSED_CLIENT_ID\" $INFO_PLIST\n"; + shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nGOOGLE_PLIST=\"$PROJECT_DIR/GoogleService-Info.plist\"\n\nif [[ -f $GOOGLE_PLIST ]]; then\n REVERSED_CLIENT_ID=$(/usr/libexec/PlistBuddy -c \"Print :REVERSED_CLIENT_ID:\" $GOOGLE_PLIST)\n /usr/libexec/PlistBuddy -c \"Set :CFBundleURLTypes:1:CFBundleURLSchemes:0 $REVERSED_CLIENT_ID\" $INFO_PLIST\nfi\n"; }; DE4F6D6E22005C0400DE699E /* Setup Dropbox */ = { isa = PBXShellScriptBuildPhase; @@ -336,6 +333,24 @@ shellPath = /bin/sh; shellScript = "${PODS_ROOT}/Fabric/run\n"; }; + DEF4813D224925A2002AD03A /* Copy Google Plist file */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Copy Google Plist file"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "GOOGLE_PLIST_NAME=\"GoogleService-Info.plist\"\nGOOGLE_PLIST=\"$PROJECT_DIR/$GOOGLE_PLIST_NAME\"\nBUILD_APP_DIR=\"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app\"\n\nif [[ -f $GOOGLE_PLIST ]]; then\n cp $GOOGLE_PLIST \"$BUILD_APP_DIR/$GOOGLE_PLIST_NAME\"\nfi\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/ios/app/src/FIRUtilities.m b/ios/app/src/FIRUtilities.m index 29d754050..0d3f1c015 100644 --- a/ios/app/src/FIRUtilities.m +++ b/ios/app/src/FIRUtilities.m @@ -21,8 +21,6 @@ NSString *const kGoogleServiceInfoFileName = @"GoogleService-Info"; // Plist file type. NSString *const kGoogleServiceInfoFileType = @"plist"; NSString *const kGoogleAppIDPlistKey = @"GOOGLE_APP_ID"; -// Dummy plist GOOGLE_APP_ID -NSString *const kDummyGoogleAppID = @"1:123:ios:123abc"; @implementation FIRUtilities @@ -59,9 +57,6 @@ NSString *const kDummyGoogleAppID = @"1:123:ios:123abc"; if (!googleAppID.length) { return NO; } - if ([googleAppID isEqualToString:kDummyGoogleAppID]) { - return NO; - } return YES; }