I am tring to integrate Flutter map from lib
google_maps_flutter:
it is working fine and showing me map in emulator and real device but when i run project on IOs device it gives me below mentioned error
*** Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use'
How to resolve GMSServicesException?
- 4 years ago
I thing you are skipping provideAPIKey in your AppDelegate check your
Your_PROJECT -> ios -> Runner -> AppDelegate.m
Replace your file code with below snipits add your APIKEY
#include "AppDelegate.h" #include "GeneratedPluginRegistrant.h" #import "GoogleMaps/GoogleMaps.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GMSServices provideAPIKey:@"GOOGLE_API_KEY"]; [GeneratedPluginRegistrant registerWithRegistry:self]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } @endGoogle Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] work for me
- 4 years ago
I thing you are skipping provideAPIKey in your AppDelegate check your
Your_PROJECT -> ios -> Runner -> AppDelegate.m
Replace your file code with below snipits add your APIKEY
#include "AppDelegate.h" #include "GeneratedPluginRegistrant.h" #import "GoogleMaps/GoogleMaps.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GMSServices provideAPIKey:@"GOOGLE_API_KEY"]; [GeneratedPluginRegistrant registerWithRegistry:self]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } @endGoogle Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] work for me
Hot Questions