Parcourir la source

ios: don't bundle a dummy GoogleService-Info.plist file

It complicates automated builds.
j8
Saúl Ibarra Corretgé il y a 6 ans
Parent
révision
f662edd135

+ 1
- 0
.gitignore Voir le fichier

@@ -87,4 +87,5 @@ android/.settings/org.eclipse.buildship.core.prefs
87 87
 android/app/dropbox.key
88 88
 android/app/google-services.json
89 89
 ios/app/dropbox.key
90
+ios/app/GoogleService-Info.plist
90 91
 

+ 0
- 28
ios/app/GoogleService-Info.plist Voir le fichier

@@ -1,28 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
-<plist version="1.0">
4
-<dict>
5
-	<key>API_KEY</key>
6
-	<string>correct_api_key</string>
7
-	<key>TRACKING_ID</key>
8
-	<string>correct_tracking_id</string>
9
-	<key>CLIENT_ID</key>
10
-	<string>correct_client_id</string>
11
-	<key>REVERSED_CLIENT_ID</key>
12
-	<string>com.google.correct-reversed-client-id</string>
13
-	<key>GOOGLE_APP_ID</key>
14
-	<string>1:123:ios:123abc</string>
15
-	<key>GCM_SENDER_ID</key>
16
-	<string>correct_gcm_sender_id</string>
17
-	<key>PLIST_VERSION</key>
18
-	<string>1</string>
19
-	<key>BUNDLE_ID</key>
20
-	<string>com.google.FirebaseSDKTests</string>
21
-	<key>PROJECT_ID</key>
22
-	<string>abc-xyz-123</string>
23
-	<key>DATABASE_URL</key>
24
-	<string>https://abc-xyz-123.firebaseio.com</string>
25
-	<key>STORAGE_BUCKET</key>
26
-	<string>project-id-123.storage.firebase.com</string>
27
-</dict>
28
-</plist>

+ 20
- 5
ios/app/app.xcodeproj/project.pbxproj Voir le fichier

@@ -18,7 +18,6 @@
18 18
 		13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
19 19
 		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
20 20
 		695AF3ED6F686F9C5EE40F9A /* libPods-jitsi-meet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 489E8EFE2C720D10F5961AEF /* libPods-jitsi-meet.a */; };
21
-		DE4C455E21DE1E4300EA0709 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DE4C455D21DE1E4300EA0709 /* GoogleService-Info.plist */; };
22 21
 		DE4C456121DE1E4E00EA0709 /* FIRUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */; };
23 22
 /* End PBXBuildFile section */
24 23
 
@@ -55,7 +54,6 @@
55 54
 		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 = "<group>"; };
56 55
 		489E8EFE2C720D10F5961AEF /* libPods-jitsi-meet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-jitsi-meet.a"; sourceTree = BUILT_PRODUCTS_DIR; };
57 56
 		B3B083EB1D4955FF0069CEE7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = app.entitlements; sourceTree = "<group>"; };
58
-		DE4C455D21DE1E4300EA0709 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = SOURCE_ROOT; };
59 57
 		DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRUtilities.m; sourceTree = "<group>"; };
60 58
 		DE4C456021DE1E4E00EA0709 /* FIRUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIRUtilities.h; sourceTree = "<group>"; };
61 59
 /* End PBXFileReference section */
@@ -91,7 +89,6 @@
91 89
 				13B07FB01A68108700A75B9A /* AppDelegate.m */,
92 90
 				DE4C456021DE1E4E00EA0709 /* FIRUtilities.h */,
93 91
 				DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */,
94
-				DE4C455D21DE1E4300EA0709 /* GoogleService-Info.plist */,
95 92
 				13B07FB51A68108700A75B9A /* Images.xcassets */,
96 93
 				13B07FB61A68108700A75B9A /* Info.plist */,
97 94
 				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
@@ -149,6 +146,7 @@
149 146
 				0B26BE701EC5BC3C00EEFB41 /* Embed Frameworks */,
150 147
 				B35383AD1DDA0083008F406A /* Adjust embedded framework architectures */,
151 148
 				0BB7DA181EC9E695007AAE98 /* Adjust ATS */,
149
+				DEF4813D224925A2002AD03A /* Copy Google Plist file */,
152 150
 				DEC2069321CBBD6900072F03 /* Setup Fabric */,
153 151
 				DE11877A21EE09640078D059 /* Setup Google reverse URL handler */,
154 152
 				DE4F6D6E22005C0400DE699E /* Setup Dropbox */,
@@ -209,7 +207,6 @@
209 207
 			buildActionMask = 2147483647;
210 208
 			files = (
211 209
 				0B412F211EDEE95300B1A0A6 /* Main.storyboard in Resources */,
212
-				DE4C455E21DE1E4300EA0709 /* GoogleService-Info.plist in Resources */,
213 210
 				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
214 211
 				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
215 212
 			);
@@ -298,7 +295,7 @@
298 295
 			);
299 296
 			runOnlyForDeploymentPostprocessing = 0;
300 297
 			shellPath = /bin/sh;
301
-			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";
298
+			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";
302 299
 		};
303 300
 		DE4F6D6E22005C0400DE699E /* Setup Dropbox */ = {
304 301
 			isa = PBXShellScriptBuildPhase;
@@ -336,6 +333,24 @@
336 333
 			shellPath = /bin/sh;
337 334
 			shellScript = "${PODS_ROOT}/Fabric/run\n";
338 335
 		};
336
+		DEF4813D224925A2002AD03A /* Copy Google Plist file */ = {
337
+			isa = PBXShellScriptBuildPhase;
338
+			buildActionMask = 2147483647;
339
+			files = (
340
+			);
341
+			inputFileListPaths = (
342
+			);
343
+			inputPaths = (
344
+			);
345
+			name = "Copy Google Plist file";
346
+			outputFileListPaths = (
347
+			);
348
+			outputPaths = (
349
+			);
350
+			runOnlyForDeploymentPostprocessing = 0;
351
+			shellPath = /bin/sh;
352
+			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";
353
+		};
339 354
 /* End PBXShellScriptBuildPhase section */
340 355
 
341 356
 /* Begin PBXSourcesBuildPhase section */

+ 0
- 5
ios/app/src/FIRUtilities.m Voir le fichier

@@ -21,8 +21,6 @@ NSString *const kGoogleServiceInfoFileName = @"GoogleService-Info";
21 21
 // Plist file type.
22 22
 NSString *const kGoogleServiceInfoFileType = @"plist";
23 23
 NSString *const kGoogleAppIDPlistKey = @"GOOGLE_APP_ID";
24
-// Dummy plist GOOGLE_APP_ID
25
-NSString *const kDummyGoogleAppID = @"1:123:ios:123abc";
26 24
 
27 25
 
28 26
 @implementation FIRUtilities
@@ -59,9 +57,6 @@ NSString *const kDummyGoogleAppID = @"1:123:ios:123abc";
59 57
   if (!googleAppID.length) {
60 58
     return NO;
61 59
   }
62
-  if ([googleAppID isEqualToString:kDummyGoogleAppID]) {
63
-    return NO;
64
-  }
65 60
 
66 61
   return YES;
67 62
 }

Chargement…
Annuler
Enregistrer