Get the current path of the .app executable

How can I get the current path of my .app that is running in a cocoa mac application?

I tried using NSTask to execute pwd but returned me /

+5
source share
1 answer

I found it using [[NSBundle mainBundle] bundlePath]

+11
source

All Articles