Subject: How to add existing SQLite database to a project

Original Post Matthew Delmarter's Avatar

Matthew Delmarter

27 Jul, 2009 02:27 AM via

If I created an SQLite database and added it as a Resource to my project, how do I deploy this to the iPhone and use it for the application? I have seen the example that creates a new database on the fly and inserts data, but that is obviously not ideal for a application that has required table structures and a fair amount of default data.

Any clues on how to do this?

Showing the most recent page of comments. View the first page

  1. 32 Posted by alan on 30 Jan, 2010 10:55 PM

    alan's Avatar

    Thanks. Is there a good Mac-chrome solution? I do Xcode installed. I
    noticed the Sqlite Browser but something called Rosetta was trying to
    install when I tried it.

  2. 33 Posted by Andrew Angelo Ang on 08 Feb, 2010 07:50 AM

    Andrew Angelo Ang's Avatar

    I also agree with Dan Giulvezan. There should be an option to Titanium.Database.install to overwrite the existing one for development purposes.

    I propose for the ff:

    Titanium.Database.install(resource_name, target_name, options)

    Where options is an object {} that may have the ff properties:
    - force {boolean} Defaults to false

    The following will overwrite the database:
    Titanium.Database.install(resource_name, target_name, { force: true });

    The following will not:
    Titanium.Database.install(resource_name, target_name); Titanium.Database.install(resource_name, target_name, { force: false });

  3. Support Staff 34 Posted by Kevin Whinnery on 08 Feb, 2010 04:54 PM

    Kevin Whinnery's Avatar

    Hi guys - have you created a Lighthouse issue yet? That would probably be the best place to articulate the specifics of a feature request:

    http://appcelerator.lighthouseapp.com

  4. 35 Posted by Andrew Angelo Ang on 09 Feb, 2010 02:50 AM

    Andrew Angelo Ang's Avatar

    Yup, I've already created a ticket there after I posted here.

    Ticket #382

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

You can attach files up to 10MB

What is the opposite of bad?

Recent Discussions

13 Mar, 2010 01:38 PM
13 Mar, 2010 12:39 PM
13 Mar, 2010 11:06 AM
13 Mar, 2010 10:58 AM
13 Mar, 2010 09:02 AM