Procházet zdrojové kódy

ios: dynamically load Dropbox API key

Load it at build time from a "dropbox.key" file. The file should contain the API
key in a single line.
master
Saúl Ibarra Corretgé před 6 roky
rodič
revize
77f220753f
2 změnil soubory, kde provedl 19 přidání a 5 odebrání
  1. 19
    0
      ios/app/app.xcodeproj/project.pbxproj
  2. 0
    5
      ios/sdk/src/Info.plist

+ 19
- 0
ios/app/app.xcodeproj/project.pbxproj Zobrazit soubor

@@ -151,6 +151,7 @@
151 151
 				0BB7DA181EC9E695007AAE98 /* Adjust ATS */,
152 152
 				DEC2069321CBBD6900072F03 /* Setup Fabric */,
153 153
 				DE11877A21EE09640078D059 /* Setup Google reverse URL handler */,
154
+				DE4F6D6E22005C0400DE699E /* Setup Dropbox */,
154 155
 			);
155 156
 			buildRules = (
156 157
 			);
@@ -298,6 +299,24 @@
298 299
 			shellPath = /bin/sh;
299 300
 			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 301
 		};
302
+		DE4F6D6E22005C0400DE699E /* Setup Dropbox */ = {
303
+			isa = PBXShellScriptBuildPhase;
304
+			buildActionMask = 2147483647;
305
+			files = (
306
+			);
307
+			inputFileListPaths = (
308
+			);
309
+			inputPaths = (
310
+			);
311
+			name = "Setup Dropbox";
312
+			outputFileListPaths = (
313
+			);
314
+			outputPaths = (
315
+			);
316
+			runOnlyForDeploymentPostprocessing = 0;
317
+			shellPath = /bin/sh;
318
+			shellScript = "INFO_PLIST=\"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH\"\nDROPBOX_KEY_FILE=\"$PROJECT_DIR/dropbox.key\"\n\nif [[ -f $DROPBOX_KEY_FILE ]]; then\n    /usr/libexec/PlistBuddy -c \"Delete :LSApplicationQueriesSchemes\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes array\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes:0 string 'dbapi-2'\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :LSApplicationQueriesSchemes:1 string 'dbapi-8-emm'\" $INFO_PLIST\n\n    DROPBOX_KEY=$(head -n 1 $DROPBOX_KEY_FILE)\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLName string dropbox\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLSchemes array\" $INFO_PLIST\n    /usr/libexec/PlistBuddy -c \"Add :CFBundleURLTypes:2:CFBundleURLSchemes:0 string $DROPBOX_KEY\" $INFO_PLIST\nfi\n";
319
+		};
301 320
 		DEC2069321CBBD6900072F03 /* Setup Fabric */ = {
302 321
 			isa = PBXShellScriptBuildPhase;
303 322
 			buildActionMask = 2147483647;

+ 0
- 5
ios/sdk/src/Info.plist Zobrazit soubor

@@ -18,11 +18,6 @@
18 18
 	<string>1.9.0</string>
19 19
 	<key>CFBundleVersion</key>
20 20
 	<string>$(CURRENT_PROJECT_VERSION)</string>
21
-	<key>LSApplicationQueriesSchemes</key>
22
-	<array>
23
-		<string>dbapi-2</string>
24
-		<string>dbapi-8-emm</string>
25
-	</array>
26 21
 	<key>NSPrincipalClass</key>
27 22
 	<string></string>
28 23
 </dict>

Načítá se…
Zrušit
Uložit