I have reviewed this link. I am installing a debian package with iOSOpenDev. I want to write in sqlite database using this hook. So I put the DB in /var/mobile/Documents/xxx.sqlite.
When I call NSFileManager to check if sqlite file exists, I can verify that it exists. sqlite3_open call succeeds and it opens the database. I have given chmod 666 access to this file. When I call sqlite3_exec with insert query, it fails with error message "unable to open database file".
This is really wiered. Is there a "right" folder where I should put my sqlite file when I want to write through a debian hook?