分类存档: 个人日记

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