Downloading files (slite files) into sandbox

Discussion in 'iOS Programming' started by dusker, Aug 2, 2009.

  1. dusker macrumors member

    May 31, 2009
    i decided to change an approach to model in the next release of my app. And here's how i'd like to be done: on a server side i generate a sqlite database (using php5) with all data in it. Now, i'd my iphone app to be able to download the entire sqlite file so it can be later used offline.
    Could you recommend an approach/tutorial to download sqlite files off internet?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    Use NSURLConnection to download it, and then write the data to a file inside the documents folder, which you can get via the NSSearchPathForDirectoriesInDomains function (search this site for sample code on that function).
  3. lowcountry01 macrumors newbie

    Aug 13, 2009
    could you post some sample code of how to write it to the documents folder? Thanks!

Share This Page