错误 ITMS-90171:无效的包结构 - 二进制文件 [CocoaPods 文件]

Sam*_*ami 7 xcode ios ipa cocoapods app-store-connect

上传到 App Store 时遇到此错误:

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'mobile.app/Frameworks/Pods_mobile.framework/Pods_mobile' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
Run Code Online (Sandbox Code Playgroud)

我搜索了所有类似的帖子并尝试了所有这些建议:
- Always Embed Swift Standard Library = [true, false, $(inherited)]
- Build Phases -> Copy Bundle Resources ->确保其没有框架
- 确保设置配置文件正确。
- 仅构建主动架构 = [true, false]

构建阶段: [CP] Embed Pods Frameworks &[CP] Copy Pods Resource看起来正常:
"${PODS_ROOT}/Target Support Files/Pods-mobile/Pods-mobile-frameworks.sh"
"${PODS_ROOT}/Target Support Files/Pods-mobile/Pods-mobile-resources.sh"
分别。

播客文件:

platform :ios, '12.0'
use_frameworks!

target 'mobile' do
  pod ...
end
Run Code Online (Sandbox Code Playgroud)

Sam*_*ami 10

我需要除去Pods_mobile.frameworkEmbed Frameworks,如下所示。我不确定它是如何到达那里的,但假设它有其目的,因为我没有首先添加它。

在此处输入图片说明

  • 确认这对我有用。谢谢。新版本的 Xcode 中的设置略有不同。现在,它位于 Xcode 中“常规选项卡”的“框架、库和嵌入内容”部分下的“请勿嵌入”。 (3认同)