0

BuilSettings [REFERENCE IMAGE1 ][1]我正在创建一个脚本来自动化 ios 构建以生成 .ipa ... 下面是我的脚本,

# xcodebuild -workspace "project.xcworkspace" -scheme "Schemename" clean

# xcodebuild -workspace "project.xcworkspace" -scheme "Schemename" build

# xcodebuild archive -workspace "project.xcworkspace" -scheme "schemename" -archivePath "project.xcworkspace.xcarchive"

# xcodebuild -exportArchive -archivePath "project.xcworkspace.xcarchive" -exportPath "project.xcworkspace" -exportFormat ipa -exportProvisioningProfile "Digi Form Development": *"

在执行上述脚本时出现错误,

--- xcodebuild: WARNING: -exportArchive without -exportOptionsPlist is deprecated error: no provisioning profile matches 'Digi Form Development: *' ** EXPORT FAILED **

由于我是使用 xcode cli 的 ios 构建部署的新手,请帮助我纠正我的问题,

4

1 回答 1

0

您需要创建一个 exportOptions.plist 文件,然后添加命令行标志,如下所示:

-exportOptionsPlist exportOptions.plist

导出选项 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>compileBitcode</key>
  <false/>
  <key>method</key>
  <string>ad-hoc</string>
  <key>provisioningProfiles</key>
  <dict>
    <key>my.bundle.idenifier</key>
    <string>My Provisioning Profile Name</string>
  </dict>
  <key>signingCertificate</key>
  <string>iPhone Distribution</string>
  <key>signingStyle</key>
  <string>manual</string>
  <key>stripSwiftSymbols</key>
  <true/>
  <key>teamID</key>
  <string>YOURTEAMID</string>
  <key>thinning</key>
  <string>&lt;none&gt;</string>
</dict>
</plist>

请注意,签名样式可以是手动或自动的。如果您明确设置配置文件(我倾向于这样做),请使用手动并明确指定配置文件名称。如果自动,Xcode 将尝试自动查找匹配的配置文件。

对于方法字段,选项有:开发、临时、分发和企业。

这是一个关于此功能的更一般描述的链接:http: //devcenter.bitrise.io/tips-and-tricks/xcodebuild-export-options/

于 2017-09-25T20:35:06.590 回答