Downloading files (slite files) into sandbox

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

  1. dusker macrumors member

    Joined:
    May 31, 2009
    #1
    Hi,
    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?
    greetings
    peter
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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

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

Share This Page