i use sqlite database on my iphone app and
i need to update this database from the internet from my server
how i can download the new database and delete the old database
and recopy the new database to document directory
- Download your file with +[NSData dataWithContentsOfURL:].
- Close sqlite DB, if opened.
- Remove old DB file (may be just rename - if something went wrong with downloaded data, you may revert to prev. version of a DB faile) with -[NSFileManeger removeItemAtPath:error:]
- Write downloaded data to a DB file with -[NSData writeToFile:atomically:].