I'm developing a app that use a Sqlite3 database. For now the db is inside app package, but I know that I'll have problems to update the data when I test in real world, with a real iPhone.
1 - How can I copy, at bundle phase, my project database to Library folder?
2 - How can I access this copied database? For now my code is:
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSString *dbPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"myDatabase.sqlite"];
BOOL success = [fileMgr fileExistsAtPath:dbPath];
What I'll have to change?
3 - How can I preserve this database (with the user's data) if I update the app?
Thanks in advance! ;)