UnityFramework.framework does no

2020-03-27  本文已影响0人  领导的玩具

Unity 2019 3.x 命令行 Xcode导出ipa失败

打包脚本

Xcodebuild -archivePath /build/Abyss\
-project Unity-iPhone.xcodeproj\
-configuration Release\
-scheme Unity-iPhone\
archive\
-sdk  iphoneos\
PROVISIONING_PROFILE_SPECIFIER ="your_profile" \
PRODUCT_BUNDLE_IDENTIFIER="your_buind_id”\
CODE_SIGN_IDENTITY="iPhone Developer: you (num)”

Xcodebuild -exportArchieve xxx

失败提示

xcodebuild[71566:23315429] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/v7/cgfph0sx3bs3l9hvpmhcwgkm0000gn/T/Unity-iPhone_2020-03-27_10-46-05.911.xcdistributionlogs'.
error: exportArchive: UnityFramework.framework does not support provisioning profiles.
Error Domain=IDEProvisioningErrorDomain Code=10 "UnityFramework.framework does not support provisioning profiles." UserInfo={NSLocalizedDescription=UnityFramework.framework does not support provisioning profiles., NSLocalizedRecoverySuggestion=UnityFramework.framework does not support provisioning profiles, but provisioning profile rel_com_seasun_game_abyss has been manually specified. Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.}

失败原因:

问题出在:PROVISIONING_PROFILE_SPECIFIER 这里,新版的Xcode项目,导出来会有两个target, 如图:

截屏2020-03-27上午11.30.12.png

当指定 PROVISIONING_PROFILE_SPECIFIER 的时候,也顺带把unityFramework给指定了,一旦签名指定,就会使得原来的文件导不出包。

修复方式:

cd Unity-iPhone.xcodeproj

sed -i '' 's/PRODUCT_BUNDLE_IDENTIFIER = "com.XSJ.${PRODUCT_NAME:rfc1123identifier}";/PRODUCT_BUNDLE_IDENTIFIER = "your_bundle_id";/' project.pbxproj

sed -i '' 's/CODE_SIGN_STYLE = Automatic;/CODE_SIGN_STYLE = Manual;/' project.pbxproj

sed -i '' 's/DEVELOPMENT_TEAM = "";/DEVELOPMENT_TEAM =your_team_num;/' project.pbxproj

sed -i '' 's/PROVISIONING_PROFILE_SPECIFIER = "$(PROVISIONING_PROFILE_SPECIFIER_APP)";/PROVISIONING_PROFILE_SPECIFIER = "your_profile";/' project.pbxproj
Xcodebuild -archivePath /build/Abyss\
-project Unity-iPhone.xcodeproj\
-configuration Release\
-scheme Unity-iPhone\
archive\
-sdk  iphoneos 
PRODUCT_BUNDLE_IDENTIFIER="your_buind_id”\
CODE_SIGN_IDENTITY="iPhone Developer: you (num)”

还有一个原因:

UnityFramework的bundleid 和 Unity-iPhone的 bundleid 一致或者为空,就会出现,

解决方法是
随便填个bundleid在unityFramwork的target上。

上一篇下一篇

猜你喜欢

热点阅读