Xcode 9 archiving failure - Code Signing Error: No profiles for ‘x’ were found

问题:

Error Domain=IDEProfileLocatorErrorDomain Code=1 
"No profiles for 'com.sinyee.xxxx.xxxx' were found"
UserInfo={NSLocalizedDescription=No profiles for 'com.sinyee.xxxx.xxx' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.sinyee.xxxx.xxxx'.
 Automatic signing is disabled and unable to generate a profile.
 To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}

问题根源: xcode9 修改了导出配置 默认xcode9 不允许更新钥匙串内容进行动态读取

解决办法:To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild
在xcodebuild shell 脚本中添加-allowProvisioningUpdates

 -exportOptionsPlist ${optionsDevelopmentPlistPath}   -allowProvisioningUpdates

xcode9 exportOptions.plist 新模板 中添加了新的key <key>provisioningProfiles</key>
后面打包发现其实有没有 <key>provisioningProfiles</key> 依然是可以正常导出的 因缺思厅

注意:企业包一定要包含 <key>provisioningProfiles</key>
<?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>xxxxxxxxx</string>
    <key>method</key>
    <string>app-store</string>
    <key>compileBitcode</key>
    <false/>
    <key>provisioningProfiles</key>
    <dict>
        <key>com.sinyee.xxxx.xxxx</key>
        <string>xxxxx</string>
    </dict>
</dict>
</plist>

    原文作者:RichMartin
    原文地址: https://www.jianshu.com/p/d6b4557277f6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞