Reputation: 1878
I'm working on an iOS project that other developers created and I'm having problems running this app. Now, at some point I have the following code, which returns nil
and there's where more problems are coming:
NSString *staticLibraryBundlePath = [[NSBundle mainBundle] pathForResource:@"SRVRTrackingResources" ofType:@"bundle"];
I'm not sure what is this actually looking for, I will post a structure of the project's folders:
I'm not sure what file is it looking for, the .plist
one?
Any thoughts?
Upvotes: 1
Views: 1601
Reputation: 2020
SRVRTrackingResources is of folder type ;is not a bundle. that's why it return nil.
Return Value
The full pathname for the resource file or nil if the file could not be located. This method also returns nil if the bundle specified by the bundlePath parameter does not exist or is not a readable directory.
NSString *filePath = [[NSBundle mainBundle] pathForResource:filename ofType:@"plist"];
for more check the Link
Upvotes: 3