Unable to launch App built on Mavericks

走远了吗. 提交于 2019-12-11 13:56:35

问题


I have an app for my Java Application that build on another server machine. This server machine now upgraded with Mavericks + xcode 5.1. Earlier I was facing the issue of not signing my app on server machine with Mavericks + xcode 5.1 update and I did the changes as mentioned in post - Failed to sign Mac OS X app

Changes to sign app are -

#!/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!

Above changes make my app to sign successfully, but now the app is not launching, trying with this command throwing following error -

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.

The environment are -

At Server machine

  1. Mac Version: Mavericks
  2. XCode Version: 5.0
  3. Java Version: Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/

My testing machine

  1. Mac Version : Mountain Lion 10.8.2
  2. Xcode version: Version 4.6 (4H127)
  3. Java Version: Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/

On my machine everything working fine i.e able to build, run app and sign app. But with same code the built app is sign but not launching at my machine as well as at Mavericks machine.

On goggling I found that - http://www.java.com/en/download/faq/java_mac.xml

Oracle's Java version 7u25 and below have been disabled by Apple on OS X. Updating to the latest release will allow Java to be run on Mac OS X.

If I am copying older JDK from another working app from /Applications/MyAnotherApp.app/Contents/PlugIns/jdk1.7.0_21.jdk to MyApp making my app to launch.

Is only updating the Java version solve the permission issue of JDK?

How can I resolve the issue as MyApp will always build on server machine that updated with Mavericks + Xcode 5.1

Thanks


回答1:


kLSUnknownErr (-10810) 

An unknown error has occurred. 

Basically, it means that the Launch Services framework is misbehaving and is encountering errors when trying to launch an application. When you encounter this error message, it is probably best to restart the machine

Have a look at this post.




回答2:


My issue of not launching app 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/20043127/unable-to-launch-app-built-on-mavericks

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