xcode 版本 6.7.0 中架构 arm64 Google AdMob 的未定义符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20665530/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:27:23  来源:igfitidea点击:

Undefined symbols for architecture arm64 Google AdMob in Version 6.7.0

iosxcodeadmoblibrariesarm64

提问by David Cruz

Okay so google AdMob API is supposed to work now for arm64, but I am getting this error.

好的,所以 google AdMob API 现在应该适用于 arm64,但我收到此错误。

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
objc-class-ref in libGoogleAdMobAds.a(GADGestureIdUtil.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've searched on Google and many people suggest to avoid using 64Bit capabilities. But now the API is supposed to work so I don't see why I should do that.

我在谷歌上搜索过,很多人建议避免使用 64 位功能。但是现在 API 应该可以工作了,所以我不明白为什么我应该这样做。

I am really stucked here.

我真的被困在这里。

回答by David Cruz

Okay so I found the solution.

好的,所以我找到了解决方案。

Google guide iOS developers on how to implement AdMob SDK, however they are missing some info. They tell you it's mandatory to add these Frameworks:

Google 指导 iOS 开发人员如何实施 AdMob SDK,但他们缺少一些信息。他们告诉你必须添加这些框架:

   - AudioToolbox.Framework
   - MessageUI.Framework
   - SystemConfiguration.Framework
   - CoreGraphics.Framework

To solve the error I added this ones also:

为了解决错误,我还添加了这些错误:

   -CoreData.Framework
   -AdSupport.Framework
   -CoreTelephony.Framework

回答by sneighbors

Along with -CoreData.Frameworkand -AdSupport.FrameworkI also found that I had to add the -CoreTelephony.frameworkin order to get a clean build of the sample app that is provided. (Banner Example)

除了-CoreData.Framework-AdSupport.Framework,我还发现我必须添加-CoreTelephony.framework才能获得提供的示例应用程序的干净构建。(横幅示例)

回答by brnunes

The Google Mobile Ads SDK library references the following iOS development frameworks which may not already be part of your project:

Google 移动广告 SDK 库引用了以下 iOS 开发框架,这些框架可能尚未包含在您的项目中:

  • AdSupport
  • AudioToolbox
  • AVFoundation
  • CoreGraphics
  • CoreTelephony
  • MessageUI
  • StoreKit
  • SystemConfiguration
  • 广告支持
  • 音频工具箱
  • AV基金会
  • 核心图形
  • 核心电话
  • 消息界面
  • 商店套件
  • 系统配置

Make sure all of them are added to your target > Build Phases > Link Binary With Libraries.

确保所有这些都添加到您的目标 > 构建阶段 > 链接二进制与库。

More info

更多信息

回答by Logic

along with all these

连同所有这些

  • AdSupport
  • AudioToolbox
  • AVFoundation
  • CoreGraphics
  • CoreTelephony
  • MessageUI
  • StoreKit
  • SystemConfiguration
  • 广告支持
  • 音频工具箱
  • AV基金会
  • 核心图形
  • 核心电话
  • 消息界面
  • 商店套件
  • 系统配置

I had to add CoreMotion as well.

我还必须添加 CoreMotion。