I am developing an iOS application using the Google Maps API for IOS. And I installed CocoaPod for my project and configured them according to the tutorial in Google Developer. However, when I launch my project, he says
*** Application termination due to the uncaught exception "GMSServicesException", reason: "The Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey: ...] before use"
But I already call "GMSServices.provideAPIKey" on AppDelegate.swift. Below is the code:
....
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
GMSServices.provideAPIKey("***********************")
return true
}
....
(**************) is my API key.
And since the Google Maps API uses Objective-C, so I created a Bridging header to import the library.
[application: didFinishLaunchingWithOption]. , , , , .
. .