Getting bundle file references / paths at app launch
问题 Suppose I have an arbitrary set of files included in the Main App Bundle. I would like to fetch the file URLs for those at launch and store them somewhere. Is this possible using NSFileManager ? The documentation is unclear in that regard. Note: I only need the file URLs, I do not need to access the actual files. 回答1: You can get the URL of a file in the main bundle using NSString *path = [[NSBundle mainBundle] pathForResource:@"SomeFile" ofType:@"jpeg"]; NSURL *url = [NSURL fileURLWithPath