File tree Expand file tree Collapse file tree
packages/google_maps_flutter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,25 @@ Specify your API key in the application delegate `ios/Runner/AppDelegate.m`:
5757@end
5858```
5959
60+ Or in your swift code, specify your API key in the application delegate `ios/Runner/AppDelegate.swift`:
61+
62+ ```swift
63+ import UIKit
64+ import Flutter
65+ import GoogleMaps
66+
67+ @UIApplicationMain
68+ @objc class AppDelegate: FlutterAppDelegate {
69+ override func application(
70+ _ application: UIApplication,
71+ didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
72+ ) -> Bool {
73+ GMSServices.provideAPIKey("YOUR KEY HERE")
74+ GeneratedPluginRegistrant.register(with: self)
75+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
76+ }
77+ }
78+ ```
6079Opt-in to the embedded views preview by adding a boolean property to the app's ` Info.plist ` file
6180with the key ` io.flutter.embedded_views_preview ` and the value ` YES ` .
6281
You can’t perform that action at this time.
0 commit comments