• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask Permission denied
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask Permission denied


  • Subject: Re: NSTask Permission denied
  • From: Shawn Erickson <email@hidden>
  • Date: Wed, 21 Jul 2004 20:45:42 -0700

On Jul 21, 2004, at 8:11 PM, Jim Ways wrote:

I get the following dump when i attempt to use [NSTask
launch]. I want to launch a UEF under libary but i
cant even seem to lauch anything in applications.

runtime = [[NSTask alloc] init];
[runtime setLaunchPath:
@"/Applications/TextEdit.app"];
[runtime launch];

*** NSTask: Task create for path
/Applications/TextEdit.app failed: 13, "Permission
denied".

Any ideas? Thanks Guys!

/Applications/TextEdit.app isn't an application it is directory. Native applications on Mac OS X are really directories with a well defined internal file layout [1]. You likely want to hit the executable directly ... /Applications/TextEdit.app/Contents/MacOS/TextEdit.

With that said it would better to use NSWorkspace's launchApplication [2] method to launch applications. It is more future proof since it will insure the correct binary gets called (an application can have multiple binaries for differing architectures in its bundle).

-Shawn

[1] <http://developer.apple.com/documentation/CoreFoundation/Conceptual/ CFBundles/index.html>
[2] <http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSWorkspace.html#//apple_ref/doc/ uid/20000391/launchApplication_>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSTask Permission denied (From: Jim Ways <email@hidden>)

  • Prev by Date: Re: Lost in Linking a Framework within the App bundle
  • Next by Date: Re: NSTask Permission denied
  • Previous by thread: NSTask Permission denied
  • Next by thread: Re: NSTask Permission denied
  • Index(es):
    • Date
    • Thread