Admob 导致链接器命令失败,退出代码为 1 错误

Admob causing linker command failed with exit code 1 Error

我的 iOS 应用程序能够在模拟器上正常 运行,但是当我尝试将其存档时,出现以下错误。

ld: library not found for -lPods-MOEDict-Google-Mobile-Ads-SDK
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是我的其他链接器标志:

    -ObjC -l"Pods-MOEDict-Google-Mobile-Ads-SDK" -framework "AVFoundation" 
    -framework "AudioToolbox" -framework "CoreGraphics" -framework "CoreTelephony" -framework "EventKit" -framework "EventKitUI" 
-framework "GoogleMobileAds" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration" -weak_framework "AdSupport" $(inherited)

我自己解决了问题,我删除了整个 other linker flags 并将其替换为 $(inherited)

如果您使用的是 cocoapods,请不要手动管理 pods。

尝试运行遵循命令:

// Removes every trace of cocoapods from the xcode project
pod deintegrate
// Reinstalls and links cocoapods (probably gonna fix the missing framework)
pod install