J jsnuff1 macrumors 6502a Original poster Oct 4, 2003 730 340 NY Sep 16, 2008 #1 How would you go about programatically obtaining the file URL of a file thats in the root directory of the application package? My app reads an XML file that I have included with it, but have no idea on how to access it.
How would you go about programatically obtaining the file URL of a file thats in the root directory of the application package? My app reads an XML file that I have included with it, but have no idea on how to access it.
S SqueegyX macrumors regular Mar 24, 2008 108 1 Sep 16, 2008 #2 Here is a snippet from an app of mine: Code: NSString *template = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"post" ofType:@"html"]]; This will load the files named "post.html" into an NSString.
Here is a snippet from an app of mine: Code: NSString *template = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"post" ofType:@"html"]]; This will load the files named "post.html" into an NSString.