How to sign app on Mavericks with Xcode 5.0.2?

ぃ、小莉子 提交于 2020-01-05 08:31:50

问题


I am trying to sign my java app on Mavericks OS using Xcode 5.0.2 -

#!/bin/sh
if [ -f "/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate" ]; then
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
elif [ -f "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" ]; then
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
else
export CODESIGN_ALLOCATE="/usr/bin/codesign_allocate"
fi
codesign --deep -s "my name" MayApp.app
codesign -v MayApp.app && echo MayApp.app is Signed Successfully!

Earlier I have asked as Unable to launch App built on Mavericks because at that time my machine was on Mountain Lion 10.8.2, but now I have Mavericks. Now situation is similar to my server machine where we build app, as -

  • Java : jdk7u21
  • Xcode : 5.0.2

Still I am facing the same error on launching app i.e -

admins-iMac-4:~ admin$ open /Users/admin/Desktop/APP/MyApp.app 
LSOpenURLsWithRole() failed with error -10810 for the file /Users/admin/Desktop/APP/MyApp.app.

If I sign without --deep parameter then -

SigningApp:
     [exec] MayApp.app: code object is not signed at all
     [exec] In subcomponent: /Users/admin/Desktop/BUILD/MayApp.app/Contents/PlugIns/jdk1.7.0_21.jdk
     [exec] MayApp.app: code object is not signed at all

I have tried with multiple combinations to sign like but all are vain -

  • codesign --deep -s "my name" MayApp.app
  • codesign --force -s "my name" MayApp.app
  • codesign --force -s "my name" MayApp.app/Contents/PlugIns/jdk1.7.0_21.jdk

Tried to sign jdk before signing app, but nothing happen with app.

Everything was working fine before Mavericks, earlier no need of using --deep parameter within signing statement required.

If I am building app WITHOUT SIGNING app then it launching fine!!

Please suggest any way of signing app at Mavericks.

Thanks


回答1:


My issue has been resolved by updating Java from jdk7u21 to latest jdk7u45, the detailed information added here - How to preserve alias property while signing app?

Thanks



来源:https://stackoverflow.com/questions/20186202/how-to-sign-app-on-mavericks-with-xcode-5-0-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!