【发布时间】:2015-11-19 06:25:55
【问题描述】:
我正在尝试使用 Swift 2.0 将 Google Maps SDK 实施到我的项目中。我遵循这个,但是在运行这个时,我的应用程序收到以下错误:
2015-08-25 19:05:17.337 googleMap[1919:54102] *** Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use
*** First throw call stack:
(
0 CoreFoundation 0x00000001058499b5 __exceptionPreprocess + 165
...
...
...
31 UIKit 0x000000010606699e UIApplicationMain + 171
32 googleMap 0x00000001034b720d main + 109
33 libdyld.dylib 0x0000000107fba92d start + 1
34 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
我已经尝试了 StackOverflow 中所有可能的解决方案。
【问题讨论】:
-
你看我的回答,你需要在appdelegate中添加GMSPlacesClient.provideAPIKey("Your key")
标签: ios swift xcode google-maps google-maps-sdk-ios