我正在使用
xcodebuild在命令行上构建iOS项目.使用Release配置构建可以创建和App.xcarchive.然后我试图导出App Store IPA的存档,使用,
xcodebuild -exportArchive -archivePath App.xcarchive -exportPath ~/output/ -exportOptionsPlist appstore.plist
我的appstore.plist,
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>teamID</key> <string>T3AM1D</string> <key>method</key> <string>app-store</string> </dict> </plist
这给了我错误,
error: exportArchive: The operation Couldn’t be completed.(IDEdistributionErrorDomain error 3.)
任何帮助将不胜感激.
解决方法
最后我能够解决这个问题.
解决方案步骤
>确保在Mac中成功设置了所有配置文件和证书
>确保Xcode没有显示红色标记,例如Xcode-> targets-> Build settings – > Profiles和签名身份团队
>确保包括MainApp,Widgets,Extensions在内的所有目标也可以顺利配置
>确保所有功能,appgroup和钥匙串都正常
>重要提示:确保来自Xcode – >产品 – >档案 – >导出到App Store IPA至少运行一次
>从命令行运行xcodebuild时,请确保Xcode已关闭
希望这可以帮助