Monday, April 29, 2013

NSBundle executablePath example ios


executablePath

Returns the full pathname of the receiver's executable file.
- (NSString *)executablePath
Return Value
The full pathname of the receiving bundle’s executable file.
Example of [NSBundle executablePath]
[[NSBundle mainBundle] bundlePath]; // path to your.app
[[NSBundle mainBundle] executablePath]; // path to your.app main executable
Example of [NSBundle executablePath]
NSString * path = [[NSBundle mainBundle] executablePath];
NSData * filedata = [NSData dataWithContentsOfFile:path];