xcode 9 手动签名 ** 导出失败 **

xcode 9 Manual Signing ** EXPORT FAILED **

我正在尝试使用 Jenkins 持续集成 Ios 项目。我正在使用以下命令手动指定代码签名身份和配置文件。

/usr/bin/xcodebuild -workspace "Project.xcworkspace" -scheme "projectTest" -archivePath build/Project -configuration Release archive CODE_SIGN_STYLE=Manual PROVISIONING_PROFILE=”CompanyNameQAAdhocDistribution” CODE_SIGNING_IDENTITY="iPhone Developer: xxxxxxx xxxx (xxxxxxxxxx)"

** ARCHIVE SUCCEEDED **

For Exporting the IPA I am using below command.

/usr/bin/xcodebuild -exportArchive -archivePath "build/Project.xcarchive" -exportPath "build/Project.ipa" -exportOptionsPlist "Build/Project.xcarchive/Info.plist"

Error Message:

Error Domain=IDEProvisioningErrorDomain Code=9 ""ProjectTest.app" requires a provisioning profile with the Push Notifications and Apple Pay features." UserInfo={NSLocalizedDescription="ProjectTest.app" requires a provisioning profile with the Push Notifications and Apple Pay features., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

** EXPORT FAILED **

可以从 IDE 导出,但无法通过 from 命令导出。感谢任何帮助。

您可以尝试在 exportOptions.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>xxxxx</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>*com.xxxxxx*</key>
        <string>*profile name*</string>
    </dict>
    <key>method</key>
    <string>development</string>
</dict>
</plist>

然后加载它: xcodebuild -exportArchive -exportOptionsPlist "path/to/this.plist" ...

并确保您使用的是正确的。最好使用配置文件的 ID 而不是名称,或者从磁盘中删除所有旧配置文件。

在我的例子中......我在 targetapp.plist --> 配置文件下有错误的包标识符(即 targetapp bundle id 和配置文件 bundle id 不同)。将其更改为正确的(targetapp bundle id to provisionig profile)后,这个问题得到解决

试试这个解决方案。我在 Xcode 9.0 和 9.2

中成功导出了 IPA

Xcode Plugin of Jenkins not working with Xcode9.0