File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
packages/google_maps_flutter Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/
3030
3131Get an API key at <https://cloud.google.com/maps-platform/>.
3232
33+ ### Android
34+
3335Specify your API key in the application manifest ` android/app/src/main/AndroidManifest.xml`:
3436
3537` ` ` xml
@@ -39,6 +41,28 @@ Specify your API key in the application manifest `android/app/src/main/AndroidMa
3941 android:value="YOUR KEY HERE"/>
4042` ` `
4143
44+ # ## iOS
45+
46+ Supply your API key in the application delegate `ios/Runner/AppDelegate.m` :
47+
48+ ` ` ` objectivec
49+ #include "AppDelegate.h"
50+ #include "GeneratedPluginRegistrant.h"
51+ #import "GoogleMaps/GoogleMaps.h"
52+
53+ @implementation AppDelegate
54+
55+ - (BOOL)application:(UIApplication *)application
56+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
57+ [GMSServices provideAPIKey:@"YOUR KEY HERE"];
58+ [GeneratedPluginRegistrant registerWithRegistry:self];
59+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
60+ }
61+ @end
62+ ` ` `
63+
64+ # ## Both
65+
4266You can now add a `GoogleMap` widget to your widget tree.
4367
4468The map view can be controlled with the `GoogleMapController` that is passed to
You can’t perform that action at this time.
0 commit comments