我有一个简单的iOS应用程序,正在集成Google Maps。但是,显示地图视图时,我提供的API密钥会导致以下几种错误消息:
ClientParametersRequest failed, 3 attempts remaining (0 vs 5). Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x1818bf40 {data=<CFData 0x18137410 [0x302aec8]>{length = 145, capacity = 256, bytes = ...}}
这是我已经尝试无济于事的内容:
[GMSServices provideAPIKey:]
为其中的第一行代码didFinishLaunchingWithOptions
{}
有无API密钥[[Bundle mainBundle] bundleIdentifier]
我不确定还有什么尝试。我的捆绑包名称采用这种格式:net.company.MyApp
并且我已经完全按照这种方式输入了Google Cloud Console(我知道捆绑包ID区分大小写)。
难道Google不支持某种类型的包标识符(例如,大写字母或以开头net.
)?
我发现了问题。必须启用iOS版Google Maps SDK才能使密钥起作用。我已经启用了Google Maps API v3,但我认为这已经足够了,但是还不够。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句