forked from dronetag/drone-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Create secrets.xml and Secrets.plist files for API keys
- Loading branch information
1 parent
7654e38
commit 2dc649d
Showing
8 changed files
with
56 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Google Maps API key --> | ||
<!-- https://developers.google.com/maps/documentation/maps-static/get-api-key --> | ||
<string name="google_maps_api_key" translatable="false" templateMergeStrategy="preserve"> | ||
<!-- AIzaSyB... --> | ||
</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import UIKit | ||
import Flutter | ||
import GoogleMaps | ||
|
||
@UIApplicationMain | ||
@objc class AppDelegate: FlutterAppDelegate { | ||
override func application( | ||
_ application: UIApplication, | ||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | ||
) -> Bool { | ||
guard let secretsFilePath = Bundle.main.path(forResource: "Secrets", ofType: "plist") else { | ||
NSLog("Secrets.plist file was not found, make sure you've copied the Secrets.example.plist") | ||
exit(1) | ||
} | ||
|
||
let secrets = NSDictionary(contentsOfFile: secretsFilePath) | ||
|
||
guard let googleMapsKey = secrets?["GoogleMapsAPIKey"] else { | ||
NSLog("There is no GoogleMapsAPIKey key in Secrets.plist") | ||
exit(1) | ||
} | ||
|
||
GMSServices.provideAPIKey(googleMapsKey as! String) | ||
GeneratedPluginRegistrant.register(withRegistry: self) | ||
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<!-- https://developers.google.com/maps/documentation/maps-static/get-api-key --> | ||
<key>GoogleMapsAPIKey</key> | ||
<string><!-- AIzaSyB... --></string> | ||
</dict> | ||
</plist> |