i need to get the path of the app (bundlePath or bundleURL) without the app name
NSUrl *strUrl = [[NSBundle mainBundle]bundleURL];
NSString *str = [[NSBundel mainBundel]bundlePath];
how do i go about
i need to get the path of the app (bundlePath or bundleURL) without the app name
NSUrl *strUrl = [[NSBundle mainBundle]bundleURL];
NSString *str = [[NSBundel mainBundel]bundlePath];
how do i go about
Both NSURL
and NSString
have methods to remove the last path component, so this should give what you are looking for:
NSURL *strUrl = [[[NSBundle mainBundle] bundleURL] URLByDeletingLastPathComponent];
NSString *str = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent];