GoogleMaps(GMSView)不会在iOS中显示 [英] GoogleMaps (GMSView) Won't display in iOS
问题描述
我加入了以下内容:
- 试图导入
GoogleMaps / GoogleMaps.h
以及GoogleMapsM4B / GoogleMaps.h
文件通过Obj-C
桥接头 - 在我的
AppDelegate.swift(didFinishLaunchingWithOptions)
方法中手动输入iOS API密钥。 - 清理
- 关闭/重新启动Xcode
- 卸载/重新安装Xcode
-
完成这个链接之后是你吗?
无法通过,请检查您的Bundle Identifier是否与您用来创建密钥的Bundle Identifier匹配。 - Tried importing both the
GoogleMaps/GoogleMaps.h
as well as theGoogleMapsM4B/GoogleMaps.h
files through anObj-C
Bridging Header - Manually typed out the iOS API key in my
AppDelegate.swift (didFinishLaunchingWithOptions)
method. - Cleaned the project (command+shift+k)
- Closed/relaunched Xcode
- Uninstalled/reinstalled Xcode
Have all the steps mentioned in this link been followed by you?
Though you are unable to get through, check your Bundle Identifier is matching with the one you used to create the key.
几乎所有其他人都建议的。我花了两天的时间试图解决这个问题。有没有人知道这个问题的解决方案?
控制台投诉是:
$ b
> 2015-08-17 18:02:19.899项目[608:10014] ClientParametersRequest
>失败,剩余3次(0 vs 6)错误
> Domain = com.google.HTTPStatus代码= 400操作不能是
>完成。 (com.google.HTTPStatus error 400)UserInfo = 0x790bc050
> {data =< CFData 0x7925cb40 [0x22da9a8]> {length = 145,capacity = 256,
> bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
> 2015-08-17 18:02:19.899 randoPracty [608:10014] Google Maps SDK for iOS
>(M4B)版本:1.10.17867.0 2015-08 -17 18:02:19.959
> randoPracty [608:10014] ClientParametersRequest失败,2次尝试
>剩余(0 vs 6).Error Domain = com.google.HTTPStatus Code = 400The
>操作无法完成。 (com.google.HTTPStatus error 400.)
> UserInfo = 0x7925cf40 {data =< CFData 0x79187b20 [0x22da9a8]> {length =
> 145,capacity = 256,bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ...
> 3c2f48544d4c3e0a}} 2015-08-17 18:02:24,406 randoPracty [608:10014]
> ClientParametersRequest失败,剩余1次尝试(0 vs 6)。 b> Domain = com.google.HTTPStatus Code = 400操作不能是
>完成。 (com.google.HTTPStatus error 400.)UserInfo = 0x790f4c60
> {data =< CFData 0x786e5610 [0x22da9a8]> {length = 145,capacity = 256,
> bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
> 2015-08-17 18:02:32.797 randoPracty [608:10014] ClientParametersRequest
>失败,剩余0次尝试(0 vs 6)。 b> Domain = com.google.HTTPStatus Code = 400操作不能是
>完成。 (com.google.HTTPStatus error 400.)UserInfo = 0x7925b390
> {data =< CFData 0x790f3760 [0x22da9a8]> {length = 145,capacity = 256,
> bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
> 2015-08-17 18:02:32.797 randoPracty [608:10014] Google Maps SDK for iOS
>(M4B)无法连接或验证APIKey:Error
> Domain = com.google.HTTPStatus Code = 400操作不能是
>完成。 (com.google.HTTPStatus error 400.)UserInfo = 0x7925b390
> {data =< CFData 0x790f3760 [0x22da9a8]> {length = 145,capacity = 256,
> bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
> 2015-08-17 18:02:32.798 randoPracty [608:10014]您的密钥可能无效
>为您的包ID:com.User.ProjectName
一样的问题。首先按照以下步骤操作。
是好的,好的,问题在于框架。最初我也使用了GoogleMapsM4B框架,这对我来说不起作用。我从此链接下载了适用于我的其他框架。
添加新框架( GoogleMaps.framework
)并移除 GoogleMapsM4B
来自项目的框架。这解决了我的问题。希望这可以帮助你。
编辑:
从版本1.10.0开始,只能通过cocoapods支持框架安装。所有的zip下载都被删除了以前的版本。请阅读这个链接。
I have incorporated the following:
And pretty much everything else other people have suggested. I have spent two days straight trying to fix this problem. Does anyone know a solution to this problem?
The console complaint is:
> "2015-08-17 18:02:19.899 Project[608:10014] ClientParametersRequest > failed, 3 attempts remaining (0 vs 6). Error > Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be > completed. (com.google.HTTPStatus error 400.)" UserInfo=0x790bc050 > {data=<CFData 0x7925cb40 [0x22da9a8]>{length = 145, capacity = 256, > bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}} > 2015-08-17 18:02:19.899 randoPracty[608:10014] Google Maps SDK for iOS > (M4B) version: 1.10.17867.0 2015-08-17 18:02:19.959 > randoPracty[608:10014] ClientParametersRequest failed, 2 attempts > remaining (0 vs 6). Error Domain=com.google.HTTPStatus Code=400 "The > operation couldn’t be completed. (com.google.HTTPStatus error 400.)" > UserInfo=0x7925cf40 {data=<CFData 0x79187b20 [0x22da9a8]>{length = > 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... > 3c2f48544d4c3e0a}} 2015-08-17 18:02:24.406 randoPracty[608:10014] > ClientParametersRequest failed, 1 attempts remaining (0 vs 6). Error > Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be > completed. (com.google.HTTPStatus error 400.)" UserInfo=0x790f4c60 > {data=<CFData 0x786e5610 [0x22da9a8]>{length = 145, capacity = 256, > bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}} > 2015-08-17 18:02:32.797 randoPracty[608:10014] ClientParametersRequest > failed, 0 attempts remaining (0 vs 6). Error > Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be > completed. (com.google.HTTPStatus error 400.)" UserInfo=0x7925b390 > {data=<CFData 0x790f3760 [0x22da9a8]>{length = 145, capacity = 256, > bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}} > 2015-08-17 18:02:32.797 randoPracty[608:10014] Google Maps SDK for iOS > (M4B) cannot connect or validate APIKey: Error > Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be > completed. (com.google.HTTPStatus error 400.)" UserInfo=0x7925b390 > {data=<CFData 0x790f3760 [0x22da9a8]>{length = 145, capacity = 256, > bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}} > 2015-08-17 18:02:32.798 randoPracty[608:10014] Your key may be invalid > for your bundle ID: com.User.ProjectName"
I too faced the same problem. First of all follow the steps below.
If everything is well and good, the problem is with the framework. Initially I too used the GoogleMapsM4B framework which didn't work for me. I downloaded the other framework which works fine for me from this link.
Add the new framework (GoogleMaps.framework
) and remove the GoogleMapsM4B
framework from the project. This solved my problem. Hope this helps you.
EDIT:
From version 1.10.0 onwards, the framework installation is supported only via cocoapods. And all zip downloads were removed for previous versions. Read "Migration from 1.9.2 or earlier:" section under "Version 1.10.0 - May 2015" in this link.
这篇关于GoogleMaps(GMSView)不会在iOS中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!