switch secrets to loading from env - towards a more unified way of handling secrets
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m42s
Build and release debug APK / Build APK (pull_request) Has been cancelled
Build and deploy the backend to staging / Deploy to staging (pull_request) Has been cancelled

This commit is contained in:
2024-12-13 15:05:18 +01:00
parent f25355ee3e
commit 4a542a4a1f
6 changed files with 127 additions and 27 deletions

View File

@@ -1,5 +1,6 @@
import UIKit
import Flutter
import GoogleMaps
@main
@objc class AppDelegate: FlutterAppDelegate {
@@ -7,6 +8,9 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// load the key from env
let key = ProcessInfo.processInfo.environment["GOOGLE_MAPS_API_KEY"]!
GMSServices.provideAPI(key)
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}