谷歌移动广告 SDK Ios7 缺少音频框架

Posted

技术标签:

【中文标题】谷歌移动广告 SDK Ios7 缺少音频框架【英文标题】:Google Mobile Ad SDK Ios7 missing audio framework 【发布时间】:2013-12-01 20:34:26 【问题描述】:

尝试将 Google 移动广告 SDK 添加到项目中,但看起来我缺少框架。我已将AVfoundation 框架添加到项目中,但仍会触发这些。

Ld /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator/ForgeInspector.app/ForgeInspector normal i386
    cd /Users/kevzettler/checkiday/forge-admob/inspector/ios-inspector
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.0.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator -F/Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator -F/Users/kevzettler/checkiday/forge-admob/inspector/ios-inspector -filelist /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Intermediates/ForgeInspector.build/Debug-iphonesimulator/ForgeInspector.build/Objects-normal/i386/ForgeInspector.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0.1 /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator/libForgeModule.a -framework SystemConfiguration -framework AssetsLibrary -framework UIKit -framework Foundation -framework CoreGraphics -framework ForgeCore -Xlinker -dependency_info -Xlinker /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Intermediates/ForgeInspector.build/Debug-iphonesimulator/ForgeInspector.build/Objects-normal/i386/ForgeInspector_dependency_info.dat -o /Users/kevzettler/Library/Developer/Xcode/DerivedData/ForgeInspector-hatfxtfbvtjkzgalvydfjjdmgdvi/Build/Products/Debug-iphonesimulator/ForgeInspector.app/ForgeInspector


Undefined symbols for architecture i386:
  "_AVAudioSessionPortBuiltInSpeaker", referenced from:
      -[GADDevice audioRouteUsingAVAudioSession] in libForgeModule.a(GADDevice.o)
  "_AVAudioSessionPortHeadphones", referenced from:
      -[GADDevice audioRouteUsingAVAudioSession] in libForgeModule.a(GADDevice.o)
  "_AudioServicesPlaySystemSound", referenced from:
      -[GADDefaultGMSGHandler didReceiveVibrateNotification:] in libForgeModule.a(GADDefaultGMSGHandler.o)
  "_AudioSessionGetProperty", referenced from:
      -[GADDevice audioRouteUsingAudioToolkit] in libForgeModule.a(GADDevice.o)
  "_AudioSessionInitialize", referenced from:
      -[GADDevice audioRouteUsingAudioToolkit] in libForgeModule.a(GADDevice.o)
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
      objc-class-ref in libForgeModule.a(GADDevice.o)
  "_OBJC_CLASS_$_AVAudioSession", referenced from:
      objc-class-ref in libForgeModule.a(GADDevice.o)
  "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
      objc-class-ref in libForgeModule.a(GADOpener.o)
  "_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
      objc-class-ref in libForgeModule.a(GADOpener.o)
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
      objc-class-ref in libForgeModule.a(GADOpener.o)
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:
      -[GADOpener openInAppStore:fallbackURLString:] in libForgeModule.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

构建阶段的框架:

【问题讨论】:

***.com/questions/20045240/…的可能重复 【参考方案1】:

对于剩余的 AVAudioSession...AudioSession... 符号,您需要 AudioToolbox 框架。

对于其他符号,您还需要 StoreKitMessageUI 框架。

【讨论】:

在我的构建阶段添加了包含框架的屏幕截图,看起来我拥有所有这些,但仍然出现错误。 我尝试添加 AudioUnit.framework,错误减少到 1,但仍然收到“Framework not found AudioUnit”错误。【参考方案2】:

好的,看起来问题是我正在为 trigger.io 构建一个模块,并且它具有嵌套的 xcode 项目。当父项目实际需要它们时,我将框架添加到子项目中。

【讨论】:

以上是关于谷歌移动广告 SDK Ios7 缺少音频框架的主要内容,如果未能解决你的问题,请参考以下文章

移动安装广告被 Facebook 拒登

是否可以仅将 Facebook 移动 SDK 用于移动应用安装广告?

为 Facebook 移动应用安装广告安装 Facebook SDK

开源无止境,谷歌新的移动UI框架—Flutter落地

谷歌移动广告和 Kindle Fire

什么版本的Google移动广告SDK是Xamarin.Google.iOS.MobileAds使用的?