-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Description
In the method initWithXMLFile, in order to load the file the following code is used:
NSString * bundlePath = [[NSBundle bundleForClass:[self class]] pathForResource:aXMLFile ofType:aFileExtension];
I think this is not good. Because when aXMLFile is a file path with directory it won't load correctly. The best way to handle it is to use pathForResource in directory:
NSString *directory = [aXMLFile stringByDeletingLastPathComponent];
NSString *file = [aXMLFile lastPathComponent];
NSString * bundlePath = [[NSBundle bundleForClass:[self class]] pathForResource:file ofType:aFileExtension inDirectory:directory];
Hope you can fix it in the next version :)
Metadata
Metadata
Assignees
Labels
No labels