Monday, April 29, 2013

NSBundle executablePath example ios


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
[[NSBundle mainBundle] executablePath]; // path to main executable
Example of [NSBundle executablePath]
NSString * path = [[NSBundle mainBundle] executablePath];
NSData * filedata = [NSData dataWithContentsOfFile:path];