xcode9 打包报错问题解决

xcodebuild -workspace HuLaVenue.xcworkspace -scheme HLCG -configuration Debug clean -archivePath /目录/HuLaVenue-dev-315 archive CODE_SIGN_IDENTITY=”iPhone Developer: xxxxxxxx” PROVISIONING_PROFILE=”UUIDUUIDUUIDUUIDUUIDUUID”

xcodebuild -exportArchive -archivePath /目录/HuLaVenue-dev-315.xcarchive -exportPath /目录/build -exportOptionsPlist /目录/export-dev.plist

2017-09-21 15:18:04.806 xcodebuild[8273:56611] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path ‘/var/folders/d7/cpr_njpd7_gf29sww6x6k0pc0000gn/T/HLCG_2017-09-21_15-18-04.806.xcdistributionlogs’.
2017-09-21 15:18:05.405 xcodebuild[8273:56611] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7f820c1584e0>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 “Locating signing assets failed.” UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
“Error Domain=IDEProvisioningErrorDomain Code=9 \”\”HLCG.app\” requires a provisioning profile with the Associated Domains and Push Notifications features.\” UserInfo={NSLocalizedDescription=\”HLCG.app\” requires a provisioning profile with the Associated Domains and Push Notifications features., NSLocalizedRecoverySuggestion=Add a profile to the \”provisioningProfiles\” dictionary in your Export Options property list.}”
)}
error: exportArchive: “HLCG.app” requires a provisioning profile with the Associated Domains and Push Notifications features.

Error Domain=IDEProvisioningErrorDomain Code=9 “”HLCG.app” requires a provisioning profile with the Associated Domains and Push Notifications features.” UserInfo={NSLocalizedDescription=”HLCG.app” requires a provisioning profile with the Associated Domains and Push Notifications features., NSLocalizedRecoverySuggestion=Add a profile to the “provisioningProfiles” dictionary in your Export Options property list.}

** EXPORT FAILED **

Build step ‘Execute shell’ marked build as failure
Finished: FAILURE

 

 

解决办法:编辑plist文件 添加
解决办法:编辑plist文件 添加
<key>provisioningProfiles</key>
<dict> <key>com.hula.xxxxxx</key>
<string>HulaVenueDev</string> (此处名字获得见下文)
</dict>

如:

<?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>provisioningProfiles</key>
	<dict>
		<key>com.hula.xxxxxx</key>
        <string>HulaVenueDev</string>
	</dict>
    <key>compileBitcode</key>  
    <false/>
    <key>teamID</key>
	<string>teamIDteamIDteamID</string>
    <key>method</key>  
    <string>development</string> 
    <key>uploadSymbols</key>
    <true/> 
</dict>
</plist>

provisioningProfile名可以在apple deveploer后台获得。也可以在mobileprovision文件中获得。
如图:

或 less dev.mobileprovision 找到Name

发表评论?

8 条评论。

  1. 阅读博客获得的进步不亚于阅读一本书。

  2. 工程应该怎么设置?team和provisioningProfile都设置为空吗?

  3. 2017-09-28 16:55:33.298 xcodebuild[58842:2191480] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path ‘/var/folders/dj/3x6kkpbn7gn1rfnhcmm731380000gp/T/Simulation_2017-09-28_16-55-33.294.xcdistributionlogs’.
    2017-09-28 16:55:36.883 xcodebuild[58842:2191480] [MT] IDEDistribution: Step failed: : Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 “Locating signing assets failed.” UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    “Error Domain=IDEProvisioningErrorDomain Code=9 \”\”BaonahaoSchool.app\” requires a provisioning profile with the Push Notifications feature.\” UserInfo={NSLocalizedDescription=\”BaonahaoSchool.app\” requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the \”provisioningProfiles\” dictionary in your Export Options property list.}”
    )}
    error: exportArchive: “BaonahaoSchool.app” requires a provisioning profile with the Push Notifications feature.

    Error Domain=IDEProvisioningErrorDomain Code=9 “”BaonahaoSchool.app” requires a provisioning profile with the Push Notifications feature.” UserInfo={NSLocalizedDescription=”BaonahaoSchool.app” requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the “provisioningProfiles” dictionary in your Export Options property list.}

    这个是错误

  4. 你好,我在 Option plist文件中照你给的方法加入了 provisioningProfile xcodebuild导出ipa失败呀

  5. 感谢楼主,已经解决 但是能解释一下添加这个的原因吗

  6. provisioningProfiles

    com.myxx.xxxx
    chezhilian_explicit_appid_profile

    这个是我在info.plist中添加的字段,结果还是报错

  7. 你好,我们是同样的错误,我在info.pllist中添加了provisioningProfile字段,还是报这个错,有没有什么建议啊,jenkins都已经连续失败五十多次了

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>