小编iBe*_*ner的帖子

例外:用于iOS的Google Maps SDK必须在使用前通过[GMSServices provideAPIKey:...]进行初始化

我正在尝试使用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
Run Code Online (Sandbox Code Playgroud)

我已尝试过StackOverflow的所有可能解决方案.

google-maps ios google-maps-sdk-ios swift

8
推荐指数
4
解决办法
2万
查看次数

标签 统计

google-maps ×1

google-maps-sdk-ios ×1

ios ×1

swift ×1