Currently Being ModeratedApr 19, 2013 3:51 AM (in response to Dhiraj Bhor)
Dhiraj Bhor wrote:
I am developing an application tool that requires a function which will give me users default browser name.
I have code as below
This code works well when i am normal user. But when i ran same code as super user, it give me error
LSGetApplicationForURL() failed. Error:(-10814)
Why this happened?
I am waiting for some quick replies which i had not got last time.
Thanks in advance,
A simple Google search which you can do yourself will give you the answer.
Currently Being ModeratedApr 19, 2013 7:01 AM (in response to Michael Superczynski)
I dont know whether i searched wrongly or what but i need simplest answer.If you have taken a look at this question can you provide me some input about how to go ahead with such an error(runtime).
Thanks once again for advice but when i put my question on Apple Developer Forum for help
i think expertise provide best way to do that task.It will increase reusability of thoughts.What would you say?
Currently Being ModeratedApr 19, 2013 7:04 AM (in response to Dhiraj Bhor)
You searched wrongly.
It took me about 5 seconds to find this: https://developer.apple.com/library/mac/#documentation/Carbon/Reference/LaunchSe rvicesReference/Reference/reference.html
Currently Being ModeratedApr 22, 2013 4:02 AM (in response to Michael Superczynski)
Please correct me if i am wrong my friend.Actually i started searching from this link before you posted.
And i got what are different error codes but not actual simple philosophy that i required.Can you simplify that if you think to help.Suggestions are welcome.I never ignored them till date.
Currently Being ModeratedApr 22, 2013 8:41 AM (in response to Dhiraj Bhor)
The launch services database is maintained at a user level. Either super user does not have a LS DB or there is no entry in it for an app that browses. The bigger question is: Why on earth are you trying this from super user?
Currently Being ModeratedApr 22, 2013 9:26 PM (in response to xnav)
I was developing an app and i created and tested under normal user. When i tested it as root(super user) it gave me error.Thanks for priceless help about LS DB.It will be helpful to anyone.I never thought about it.
Its wonderful to get responses from developers on this site.