无法添加Google Places API密钥

你知道

抱歉,这是一个简单的问题,但是我似乎无法将我的Google Places API密钥添加到Xcode中,并且语法显示错误。

我假设我将其添加如下:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:[GMSServices provideAPIKey:@"AIzaSyC3XTKEp28ugdIwO1Zz7wv3uSPw1reTGeI"]; (NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    return YES;
}

如果有人能够给我正确的语法,我将不胜感激,因为Google Developer部分中的说明非常模糊。

谢谢

迪伦·贝特曼(Dylan Bettermann)

您需要在方法主体内部提供API密钥。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [GMSServices provideAPIKey:@"ABC123"];
    return YES;
}

旁注:不要共享您的API密钥。您不希望其他人使用它,对吗?:)

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法使用生成的密钥访问Google Places API

来自分类Dev

Google Maps Places:为什么需要API密钥?

来自分类Dev

适用于Android应用的Google Places API密钥

来自分类Dev

Google Maps Places:为什么需要API密钥?

来自分类Dev

Google Places API无法加载

来自分类Dev

实施Google Places API

来自分类Dev

Google Places API替代

来自分类Dev

Google Places API的使用

来自分类Dev

Google Places APi照片

来自分类Dev

Google Places 活动 API

来自分类Dev

InputStreamReader无法连接到Google Places API

来自分类Dev

Google Places API Android resultCallback无法启动

来自分类Dev

如何为我的Android应用程序获取Google Places API密钥

来自分类Dev

使用Google Places附近搜索API无法获得与Google Places API完全匹配的信息

来自分类Dev

从Google Places API获取数据

来自分类Dev

Google places autocomplete api limits

来自分类Dev

MarkLogic Google Places API查询

来自分类Dev

超出 Google Places API 配额

来自分类Dev

结合Google Places API和Facebook Places API

来自分类Dev

iOS Google Places API:“未授权此IP,网站或移动应用程序使用此API密钥”

来自分类Dev

Google Places API自动完成-添加点击事件

来自分类Dev

Google Places API:了解Places自动完成响应的解析

来自分类Dev

Google Places API与Google Geocode API

来自分类Dev

使用Google Places API的Google评论总数

来自分类Dev

使用Google Places API获取google +评论

来自分类Dev

Google Places API期间[]未显示

来自分类Dev

Android使用PlaceAutoCompleteActivity(Google Places API)

来自分类Dev

Google Places Api按距离排序

来自分类Dev

Google Places API的结果列表为空