iOS 使用终端构建过程
iOS Build process using terminal
我一直在使用脚本为企业和商店生成我的 IPA。在我更新到 xcode 8.3 后,脚本停止工作。以下是它抛出错误的行。
my $output = `xcodebuild -exportArchive -exportFormat IPA -archivePath \"$schemeArchivePath.xcarchive\" -exportPath \"$schemeIPAPath\" -exportWithOriginalSigningIdentity`;
从 Xcode 8.3 开始,使用 xcodebuild
创建 IPA 文件的过程发生了一些变化。基本上,您需要创建一个包含 IPA 导出相关选项的 plist 文件。您现在需要使用 -exportOptionsPlist config.plist
而不是 exportFormat IPA
(假设您调用文件 config.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>method</key>
<string>app-store</string>
</dict>
</plist>
如果您想知道所有可用的 plist 选项,您只需在终端中输入 xcodebuild -h
。
希望对您有所帮助。
我一直在使用脚本为企业和商店生成我的 IPA。在我更新到 xcode 8.3 后,脚本停止工作。以下是它抛出错误的行。
my $output = `xcodebuild -exportArchive -exportFormat IPA -archivePath \"$schemeArchivePath.xcarchive\" -exportPath \"$schemeIPAPath\" -exportWithOriginalSigningIdentity`;
从 Xcode 8.3 开始,使用 xcodebuild
创建 IPA 文件的过程发生了一些变化。基本上,您需要创建一个包含 IPA 导出相关选项的 plist 文件。您现在需要使用 -exportOptionsPlist config.plist
而不是 exportFormat IPA
(假设您调用文件 config.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>method</key>
<string>app-store</string>
</dict>
</plist>
如果您想知道所有可用的 plist 选项,您只需在终端中输入 xcodebuild -h
。
希望对您有所帮助。