【发布时间】:2014-10-04 21:17:57
【问题描述】:
今天我试图将 GoogleAdMob SDK 更新到 6.12,因此在阅读文档时我发现 google 建议使用 cocoaPods 来管理依赖项。我从我的项目中删除了以前的 6.10 SDK 文件并按照下面。
所以我在我的机器上安装了 cocoaPods,并按照 adMob 文档中给出的步骤进行操作
安装 pod 后,我从终端收到此消息
Installing Google-Mobile-Ads-SDK (6.12.0)
Generating Pods project
Integrating client project
[!] From now on use `abc.xcworkspace`.
[!] The use of implicit sources has been deprecated. To continue using all of the sources currently on your machine, add the following to the top of your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
[!] The `abc [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `abc [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
我的第一个疑问 这些警告意味着什么以及如何解决?
其次
我按照 cocoaPods 的建议打开了 abc.xcworkspace,我现在可以看到下面的屏幕截图中的两个项目
在图片中,您可以看到所有框架都是红色的。那么这是一个问题还是它的罚款?
最后是我在使用 cocoaPods 之前运行的代码
m_googleAdView.frame = CGRectMake(0.0, 918.0, kGADAdSizeBanner.size.width,kGADAdSizeBanner.size.height);
[m_googleAdView loadRequest:[GADRequest request]];
我添加bannerView的代码已经编码,但我现在收到这些错误
Undefined symbols for architecture armv7:
"_kGADAdSizeBanner", referenced from:
-[AllViewController viewDidLoad] in AllViewController.o
"_OBJC_CLASS_$_GADRequest", referenced from:
objc-class-ref in AllViewController.o
objc-class-ref in PageViewController.o
"_OBJC_CLASS_$_GADBannerView", referenced from:
objc-class-ref in AllViewController.o
objc-class-ref in PageViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
【问题讨论】: