简体   繁体   English

通过cocoapods安装适用于iOS的Google Maps SDK会导致链接器错误

[英]Installing Google Maps SDK for iOS via cocoapods causes linker errors

I'm trying to install the Google Maps SDK for iOS version 1.3.0 using cocoapods. 我正在尝试使用cocoapods安装适用于iOS版本1.3.0的Google Maps SDK。

Actually the installation process is well succeeded, but when I try to use the framework the app building process returns linker errors, eg: 实际上安装过程很成功,但是当我尝试使用框架时,应用程序构建过程会返回链接器错误,例如:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GMSServices", referenced from:
    objc-class-ref in AppDelegate.o

For some reason the linker can't find the framework. 由于某种原因,链接器无法找到框架。 My cocoapods version is 0.20.1. 我的cocoapods版本是0.20.1。 XCode 4.6.2. XCode 4.6.2。

Besides Google Maps SDK my project has 2 other libraries added via cocoapods. 除了谷歌地图SDK,我的项目还有另外两个通过cocoapods添加的库。 Here is my Podfile: 这是我的Podfile:

platform :ios, '5.1'

pod 'DTCoreText'
pod 'MKNetworkKit'
pod 'Google-Maps-iOS-SDK'

Thanks in advance. 提前致谢。

You should see a file "Pods.xcconfig" which will include the frameworks that the pod is using. 您应该看到一个文件“Pods.xcconfig”,其中包含pod正在使用的框架。 Change your app's target configurations to be based on CocoaPods. 将应用程序的目标配置更改为基于CocoaPods。

GoogleMaps to iOS nothing working in iOS < 6.0. GoogleMaps到iOS无法在iOS <6.0中运行。

white on Podfile: Podfile上的白色:

platform :ios, '6.1' 平台:ios,'6.1'

pod 'DTCoreText' pod'DTCoreText'

pod 'MKNetworkKit' pod'MKNetworkKit'

pod 'Google-Maps-iOS-SDK' pod'Google-Maps-iOS-SDK'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM