hi i personally use sqlite database on my small apple iphone application and

i have to update this database from the web from the server

the way i can download the brand new database and remove the old database

and recopy the brand new database to document directory

  1. Download your file with +[NSData dataWithContentsOfURL:].
  2. Close sqlite DB, if opened up.
  3. Remove old DB file (might be just relabel - if something went wrong with downloaded data, you might revert to prev. version of the DB faile) with -[NSFileManeger removeItemAtPath:error:]
  4. Write downloaded data to some DB file with -[NSData writeToFile:atomically:].