I tried importing db in my Supporting files folder and connected to db using:
NSString *sqliteDb = [[NSBundle mainBundle] pathForResource:@”person” ofType:@”sqlite”];
if(sqlite3_open([sqliteDb UTF8String], & database)!=SQLITE_OK)
I tried inserting values through code which got inserted but when I quit the program and check the db that values are not present. I don’t know what’s going wrong here.
Ok. Now copy that database to any local place which will be your data storage of the application. The code given below will do the same.
After that, execute your query and you will get inserted data in your application simulator folder.