iphone - resourcePath not working Xcode -
I have created a SQLite database with data for my app, and dragged it into a supported file group in Xcode.
This file does not read. However, if I enter the full file path: The app works fine. I have printed the file path by: And this is: Any ideas why? The best way to deal with the path is to tell the API path string details about "applying" stuff Keep in mind NSString * bundlePath = [[[NSBundle main bundle] resourcepath] stringbapping path comparison: @ "database ADB"];
NSString * bundlePath = @ "users / xxxx / apps / app / database.db";
NSString * bundlePath = [[NSBundle mainBundle] resourcepath] stringByAppendingPathComponent: @ "database.db"];
/ user / xxx / library / application support / iPhone simulator / 5.1 / application / EE614 EFA-BAF 9 -478E -xxxx-xxxx / app.app / database.db
NSString * path = [[NSBundle main bundle] pathForResource: @ "database" type: @ "db"];
Comments
Post a Comment