Azi*_*lah 5 objective-c mkmapview ios google-places-api google-places
我正在开发ios应用程序中的增强现实.我从这个网站找到了一个很好的教程和一个示例项目.在我的设备中运行该应用程序时,我在NSLOG控制台中收到错误,
Response: {
"error_message" = "This IP, site or mobile application is not authorized to use this API key.";
"html_attributions" = (
);
results = (
);
status = "REQUEST_DENIED";
}
Run Code Online (Sandbox Code Playgroud)
我在Google开发者网站上创建了一个新项目 并创建了Sever Key,因为Google地方Api 不支持iOS Key.我也尝试过使用浏览器密钥,但它没有用.
我的请求网址如下所示,
<NSMutableURLRequest https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.974760,80.225061&radius=1000&key=AIzaXXXXXXXXXXXXXXXXXXXMQ&sensor=true>
Run Code Online (Sandbox Code Playgroud)
Azi*_*lah 15
问题在于生成浏览器密钥.在生成新的浏览器密钥时,我们不应该在网站选项卡中输入任何网站网址,而是直接点击生成按钮可以提供新的浏览器密钥.

使用该密钥时,问题得到了解决.
| 归档时间: |
|
| 查看次数: |
14748 次 |
| 最近记录: |