FMDB open database -
i'm trying open database have in project inside resources.
the problem seems impossible find database file! tried complete path, , works, not solution.
i how open it!
i'm using code: db = [fmdatabase databasewithpath:@"bbdd.sql"];
i don't know how find other part of "actual" path.
do have solution me?
thanks!!!!
you need find full path of database in resource bundle, :
nsstring *databasepath = [[nsbundle mainbundle] pathforresource:@"mysqlitedatabasefile" oftype:@"sqlite3"];
there's complete example in thread copying data application data folder on iphone
Comments
Post a Comment