Given the path for a bund开发者_如何学Cle, how can I get the name of its executable?
Example:
blahblah.app
should give me
blahblah.app/Contents/MacOS/blahblah
Vice versa will also be okay
NSString *exe = [[NSBundle bundleWithPath:thePath] executablePath];
You can also use the URL variants if you're on Snow Leopard and want URLs instead.
精彩评论