0
我需要得到应用(bundlePath或bundleURL)的路径,而不应用程序名称bundelPath没有应用程序的名称
NSUrl *strUrl = [[NSBundle mainBundle]bundleURL];
NSString *str = [[NSBundel mainBundel]bundlePath];
我如何去
我需要得到应用(bundlePath或bundleURL)的路径,而不应用程序名称bundelPath没有应用程序的名称
NSUrl *strUrl = [[NSBundle mainBundle]bundleURL];
NSString *str = [[NSBundel mainBundel]bundlePath];
我如何去
两个NSURL
和NSString
有方法去除最后的路径组件,所以这应该给你你要找的东西:
NSURL *strUrl = [[[NSBundle mainBundle] bundleURL] URLByDeletingLastPathComponent];
NSString *str = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent];