Quellcode durchsuchen

ios: set Google reverse client ID at build time

Read it from the GoogleService-Info.plist file and apply it into Info.plist.
master
Saúl Ibarra Corretgé vor 6 Jahren
Ursprung
Commit
515d2f11ce
2 geänderte Dateien mit 20 neuen und 1 gelöschten Zeilen
  1. 1
    1
      ios/app/GoogleService-Info.plist
  2. 19
    0
      ios/app/app.xcodeproj/project.pbxproj

+ 1
- 1
ios/app/GoogleService-Info.plist Datei anzeigen

@@ -9,7 +9,7 @@
9 9
 	<key>CLIENT_ID</key>
10 10
 	<string>correct_client_id</string>
11 11
 	<key>REVERSED_CLIENT_ID</key>
12
-	<string>correct_reversed_client_id</string>
12
+	<string>com.google.correct-reversed-client-id</string>
13 13
 	<key>GOOGLE_APP_ID</key>
14 14
 	<string>1:123:ios:123abc</string>
15 15
 	<key>GCM_SENDER_ID</key>

+ 19
- 0
ios/app/app.xcodeproj/project.pbxproj Datei anzeigen

@@ -150,6 +150,7 @@
150 150
 				B35383AD1DDA0083008F406A /* Adjust embedded framework architectures */,
151 151
 				0BB7DA181EC9E695007AAE98 /* Adjust ATS */,
152 152
 				DEC2069321CBBD6900072F03 /* Setup Fabric */,
153
+				DE11877A21EE09640078D059 /* Setup Google reverse URL handler */,
153 154
 			);
154 155
 			buildRules = (
155 156
 			);
@@ -279,6 +280,24 @@
279 280
 			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
280 281
 			showEnvVarsInLog = 0;
281 282
 		};
283
+		DE11877A21EE09640078D059 /* Setup Google reverse URL handler */ = {
284
+			isa = PBXShellScriptBuildPhase;
285
+			buildActionMask = 2147483647;
286
+			files = (
287
+			);
288
+			inputFileListPaths = (
289
+			);
290
+			inputPaths = (
291
+			);
292
+			name = "Setup Google reverse URL handler";
293
+			outputFileListPaths = (
294
+			);
295
+			outputPaths = (
296
+			);
297
+			runOnlyForDeploymentPostprocessing = 0;
298
+			shellPath = /bin/sh;
299
+			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";
300
+		};
282 301
 		DEC2069321CBBD6900072F03 /* Setup Fabric */ = {
283 302
 			isa = PBXShellScriptBuildPhase;
284 303
 			buildActionMask = 2147483647;

Laden…
Abbrechen
Speichern