Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

How to replace Sqlite with custom version?

In our existing iPhone app built with XCode and Objective-C, we replace SQLite with a customized version by including the files sqlite3.c, sqlite3.h, and sqlite3ext.h in the project. Can this be done in Titanium so we can take advantage of custom Sqlite features? If so, how or where would we do this?

— asked March 15th 2010 by Mark Burggraf
1 Comment
  • Mark, I have read in another one of your posts that your company has created a customized sqlite for encryption of the database that stores your scripts. Any chance your company plans to release or license your copy of sqlite? Without this encryption, Titanium will not be very useful for commercial production. We are on the verge of giving up on Titanium and going back to fully compiled code, as not being able to protect our source code is a deal breaker.

    Any help you can give us to this end would be greatly appreciated.

    — commented August 11th 2010 by Jonathan Bardi

3 Answers

  • you would have to build your own database module (just like ours) with your custom version - you can look at our database module source in github

    to clone you can do:

    git clone git@github.com:appcelerator/titanium_mobile.git

    — answered March 15th 2010 by Nolan Wright
  • We have the database module already – the question, I guess, is how to integrate it into the project so it can be called. We can't even create a simple custom module (as referenced in another thread) because there's no updated documentation for creating custom modules, and the old documentation doesn't seem to work, and there's no example in the Kitchen Sink code.

    Does anybody have a simple example of creating a custom module? A simple hello, world example would be great.

    — answered March 15th 2010 by Mark Burggraf
  • The problem here is that your database module calls the internal version of Sqlite that's included in the iPhone SDK. We want to override the internal version with our own copy of Sqlite, so we need a push in the right direction.

    We are able to do this just fine in our native XCode iPhone project. Making it work with Titanium Mobile, though, is where we need a little help.

    — answered March 25th 2010 by Mark Burggraf
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.