import sql file in sqlite ios8

Discussion in 'iOS Programming' started by sgs1, Nov 20, 2014.

  1. sgs1 macrumors newbie

    Jul 14, 2014
    Hi everybody!

    I have an sql file. How i can import it in Xcode project or in my app?
    Thanks for the reply!
  2. TheWatchfulOne macrumors 6502


    Jun 19, 2009
    Cmd+Shift+Option. (I believe that's the correct key combination; I don't have a Mac in front of me at the moment.) You should then get a dialogue box that lets you browse for the file. At the bottom of the dialogue box is a check box which, if checked, will cause the file to be copied rather than moved. This is true for any file you add to your project.

    Please note that your app's bundle is read-only. So if you want to write to the database, you need to copy the file to your app's document folder when the app launches.
  3. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    What do you actually have? Data or SQL instructions? What is your end goal?

Share This Page