[英]Google Map ios sdk does not work in device, but work in simulator
I am using google ios sdk v1.2.2. 我正在使用google ios sdk v1.2.2。 I have created a very basic code to show google map view, which works fine in simulator both on iPhone and iPad. 我创建了一个非常基本的代码来显示Google地图视图,该代码在iPhone和iPad上的模拟器中都可以正常工作。 But when I try to run the same code in device (iPad 2, iOS 6.0). 但是,当我尝试在设备(iPad 2,iOS 6.0)中运行相同的代码时。 I get the following error. 我收到以下错误。
'GMSException', reason: 'Google Maps SDK for iOS requires GoogleMaps.bundle to be part of your target under 'Copy Bundle Resources “ GMSException”,原因:“ iOS版Google Maps SDK要求GoogleMaps.bundle成为您的目标的一部分,位于“复制捆绑资源”下
I checked on internet and others post on stack overflow. 我检查了互联网,而其他人则在堆栈溢出时发帖。 It recommends to put GoogleMaps.Bundle from resources folder to your project folder, I have already did that, what else I can do to fix that error. 建议将GoogleMaps.Bundle从资源文件夹放入您的项目文件夹,我已经这样做了,我还能做些什么来解决该错误。
It sounds like you haven't added the bundle to the framework list. 听起来您还没有将捆绑软件添加到框架列表中。
Select the target and go to Build Phases, then in 'Link Binary with Libraries', hit '+' then Add Other. 选择目标并转到Build Phases,然后在“ Link Binary with Libraries”中,单击“ +”,然后单击Add Other。 Select the bundle in the file browser and then retry. 在文件浏览器中选择捆绑软件,然后重试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.