Skip to content

Commit

Permalink
(iOS) read the API Key from the .plist file
Browse files Browse the repository at this point in the history
  • Loading branch information
masashiGMS committed Nov 13, 2013
1 parent 7bb3938 commit 05c9fd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ - (void)viewDidLoad
//------------------
// Create a map view
//------------------
[GMSServices provideAPIKey:@"AIzaSyADns99mO62aBapBN4_cnCJQnYdh-j6-ug"];
NSLog(@"-------initOptions");
NSLog(@"%@", initOptions);
NSString *APIKey = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"Google Maps API Key"];
NSLog(@"APIKey=%@", APIKey);
[GMSServices provideAPIKey:APIKey];

//Intial camera position
NSDictionary *cameraOpts = [initOptions objectForKey:@"camera"];
Expand Down
2 changes: 2 additions & 0 deletions platforms/ios/SimpleMap/SimpleMap-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>0.0.1</string>
<key>Google Maps API Key</key>
<string>AIzaSyADns99mO62aBapBN4_cnCJQnYdh-j6-ug</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
Expand Down

0 comments on commit 05c9fd7

Please sign in to comment.