You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

添加Google-Mobile-Ads-SDK 11.10.0后Xcode编译报错SwiftVerifyEmittedModuleInterface失败

Xcode编译报错:Command SwiftVerifyEmittedModuleInterface failed with a nonzero exit code

我正在开发一款用CocoaPods管理依赖的iOS应用,添加指定Pod并执行pod install后,在Xcode中编译项目时出现错误:

Command SwiftVerifyEmittedModuleInterface failed with a nonzero exit code

已尝试的解决方法

  • 清理项目(Cmd + Shift + K)
  • 删除DerivedData:rm -rf ~/Library/Developer/Xcode/DerivedData
  • 重新安装Pods:pod deintegrate && pod install
  • 确认Xcode版本为16.2(16C5032a)
  • 多次尝试重新编译项目
  • 从Podfile中移除Google-Mobile-Ads-SDK并重新安装Pods,错误仍存在
  • 在post_install脚本中设置SWIFT_VERIFY_EMITTED_MODULE_INTERFACE和SWIFT_EMIT_MODULE_INTERFACE为NO,问题未解决

环境信息

  • Xcode版本:16.2(16C5032a)
  • macOS版本:15.2
  • Swift版本:6.0.3
  • Google-Mobile-Ads-SDK版本:11.10.0

Podfile内容

# Uncomment the next line to define a global platform for your project
platform :ios, '14.0'

target 'Voice Recorder' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Voice Recorder
  pod 'lottie-ios'
  pod 'Firebase/Analytics'
  pod 'Firebase/Core'
  pod 'Firebase/Crashlytics'
  pod 'Firebase/RemoteConfig'
  pod 'TPInAppReceipt'
  pod 'Google-Mobile-Ads-SDK', '~> 11.10.0'

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERIFY_EMITTED_MODULE_INTERFACE'] = 'NO'
      config.build_settings['SWIFT_EMIT_MODULE_INTERFACE'] = 'NO'
    end
  end
end

请问有人遇到过这个问题吗?或者还有其他可以尝试的解决方法吗?感谢任何帮助!

内容的提问来源于stack exchange,提问作者Muhammad Umer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 04:24:59