2005-02-11 01:32:55 UTC
-[NSWorkspace openFile:] and -[NSWorkspace launchApplication:], even
started an NSTask using "/usr/bin/open". But the problem is, whenever
I build my app and *before* I double-click on the app the first time,
the above methods always fail.
(I remember a while ago that in order to combat against a document
spoofing problem, Apple made launching an app through a document more
discrimitive (by presenting users a dialog asking for confirmation). I
wonder if it is the cause of my problem.)
For example, using -[NSWorkspace openFile:] would give me
LSOpenFromURLSpec() returned -10814 for application (null) path
Is there any way to work around this problem? Thank you.