gpt4 book ai didi

ios - 异常 :Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:. ..] 使用前

转载 作者:IT王子 更新时间:2023-10-29 05:45:16 28 4
gpt4 key购买 nike

我正在尝试使用 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 中所有可能的解决方案。

最佳答案

你需要在 didFinishLaunchingWithOptions 中设置这两个

GMSPlacesClient.provideAPIKey("Your key")
GMSServices.provideAPIKey("Your key")

关于ios - 异常 :Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:. ..] 使用前,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32205872/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com