Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Database won't work on iOS

$
0
0

I'm having trouble getting Titanium's database functionality to work on iOS. I'm using the iOS simulator, simulating a iPhone 6. My host OS is OSX Yosemite and using the CLI to built it. Titanium SDK is 3.5.1GA. The code example which will show my problem is as follows:

var db = Titanium.Database.open('Clue');
db.execute('CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, fullName TEXT, isAdmin INTEGER, isActive INTEGER, email TEXT);');
Ti.API.info(db);
This returns an empty object {}. If I go into the folder the simulated iPhone 6 is located in I can clearly see the database has been created and the schema has also been added. This does work on Android, but I'm not sure why this doesn't work on iOS.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>