2
我已經嘗試過在這裏和在互聯網上的所有可用解決方案。代碼簽名驗證在xcodebuild中失敗並且無法讀取xcrun的權利
我試圖自動化iOS構建過程,並且乾淨,構建和歸檔過程成功地處理了這5個警告(錯誤)失敗的代碼簽名驗證。
warning: The CodeResources file is missing and it must be a symbolic link to _CodeSignature/CodeResources. Make certain that the bundle is on a locally-mounted volume (not a remote SMB volume), and be certain to use the Mac OS X Finder to compress it (-19062)
Unable to validate your application. - (null)
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)
warning: Icon specified in the Info.plist not found under the top level app wrapper: (-19007)
Unable to validate your application. - (null)
warning: iPhone/iPod Touch: Info.plist: Unable to verify icon dimensions, no icon found. Your MinimumOSVersion is below 3.2, so you must define CFBundleIconFile or provide a default Icon.png that is 57x57. (-19013)
Unable to validate your application. - (null)
warning: Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
如果我試圖忽略警告或使用調試配置跳過驗證協同設計,xcrun打包的.app到的.ipa失敗,以下錯誤
env SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication -v
/Users/XXXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_11_31_23.app -o
/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_11_31_23.ipa
--sign iPhone\ Distribution
--embed/Users/XXXXXXX/source/digital_hub/cms/cms_local_repo/6072/76/XXXXXXXX_AppStore_11_07_1373971044.mobileprovision
error: Failed to read entitlements from '/var/folders/n6/8tsx1pss5v3fq3sfpz8379r0ms3b7m/T/Rm5MudWNER/Payload/Test_22_07_13_11_31_23.app'
我xcodebuild聯編命令如下因爲我有工作區工作
/usr/bin/xcodebuild -verbose
-workspace /Users/XXXXX/source/digital_hub/cms/git_local_repo/11330/80/PDFReader.git/XXXXXX.xcworkspace
-scheme _DEFAULT -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="iPhone Distribution:"
PROVISIONING_PROFILE=73DE6F20-FAB9-46A2-9825-35D7DE82CD4D
CONFIGURATION_BUILD_DIR=/Users/ahsandar/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.app
OTHER_CODE_SIGN_FLAGS="--keychain /tmp/xcoder1374496105" clean
我xcrun命令如下
/usr/bin/xcrun -log -sdk iphoneos PackageApplication -v
"/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.app" -o
"/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.ipa" --sign "iPhone Distribution:"
--embed "/Users/XXXXX/source/digital_hub/cms/cms_local_repo/11330/80/XXXXXX_AppStore_11_07_1373
我正在使用xcoder gem來創建臨時鑰匙串來添加我的p12。所有使用命令行工具進行codesign的歸檔驗證都是成功的。
我與工作區工作,所以我xcodebuild聯編命令看起來像這樣, '在/ usr/bin中/ xcodebuild聯編-verbose' '-workspace /用戶/ XXXXXX /源/ digital_hub/CMS/git_local_repo /七十九分之九千九百一十五/ XXXXXXX.git/XXXXXX.xcworkspace'' _DEFAULT -scheme -sdk的iPhoneOS -configuration發佈CODE_SIGN_IDENTITY = 「iPhone分佈:」'' = PROVISIONING_PROFILE 73DE6F20-FAB9-46A2-9825-35D7DE82CD4D'' = CONFIGURATION_BUILD_DIR /用戶/ XXXXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_09_37.app' 'OTHER_CODE_SIGN_FLAGS =「 - keychain/tmp/xcoder1374495095」clean「 – DAR
我看你試試使用與默認不同的鑰匙串t - 我強烈建議使用最低設置(默認鑰匙串,默認配置(來自xcodeproj)等)。當你有結果時 - 那麼你可以嘗試放更多的參數。順便說一句,我用過(CD $ {FOLDER}; xcodebuild ....)它看起來比長途更好。 Thx, –
解決了這些問題,提供給我的目標缺少設置,並且我的.app文件夾的路徑錯誤,因此代碼簽名失敗,xcodebuild無法鏈接CodeResource文件夾,因此必須明確地執行此操作。感謝您回覆我的問題。 – DAR