当我尝试从 jenkins CI 服务器生成 iOS 应用程序 ipa 文件时,出现以下错误。你能建议我吗?
错误日志
Output directory: '/Users/Username/.jenkins/workspace/JobName/build/appname.ipa'
Temporary Directory: '/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A' (will NOT be deleted on exit when verbose set)
+ /bin/cp -Rp /Users/Username/.jenkins/workspace/JobName/build/appname.app /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload
Program /bin/cp returned 0 : []
检查原始应用程序
+ /usr/bin/codesign --verify -vvvv /Users/Username/.jenkins/workspace/JobName/build/appname.app
Program /usr/bin/codesign returned 0 : [/Users/Username/.jenkins/workspace/JobName/build/appname.app: valid on disk
/Users/Username/.jenkins/workspace/JobName/build/appname.app: satisfies its Designated Requirement
]
Done checking the original app
+ /usr/bin/codesign -d --entitlements /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/entitlements_rawrb2JgSwk /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app
Program /usr/bin/codesign returned 0 : [Executable=/private/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app/appname
]
+ /usr/libexec/PlistBuddy -c Set :get-task-allow NO /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/entitlements_plistsdXXqkO6
Program /usr/libexec/PlistBuddy returned 0 : []
+ /usr/bin/plutil -lint /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/entitlements_plistsdXXqkO6
Program /usr/bin/plutil returned 0 : [/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/entitlements_plistsdXXqkO6: OK
]
使用 'iPhone Distribution:Dist cert name' 对 '' 进行代码设计
+ /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Distribution:Dist cert name --resource-rules=/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app/ResourceRules.plist --entitlements /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/entitlements_plistsdXXqkO6 /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app
Program /usr/bin/codesign returned 1 : [Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!
/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app/ResourceRules.plist: cannot read resources
]
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Distribution:Dist cert name --resource-rules=/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app/ResourceRules.plist --entitlements /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/entitlements_plistsdXXqkO6 /var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app failed with error 1. Output: Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!
/var/folders/74/t1j47pm914jbphlv2htlhx4mwl864h/T/S8Iquejn1A/Payload/appname.app/ResourceRules.plist: cannot read resources
Failed to build /Users/Username/.jenkins/workspace/JobName/build/appname.ipa
Build step 'Xcode' marked build as failure