Titanium: Where is the SQLite DB Stored?

2019-06-07 05:18发布

I started a titanium app that uses a sqlite db. I'm getting strange DB results so just want to browse the database using FF SQLite Manager but I'm not sure where the database is?

This is the code that creates the db (part):

var db = (function() {

  //create an object which will be our public API
  var api = {};

  //maintain a database connection we can use
  var conn = Titanium.Database.open('quote');

I'm running Titanium studio on a Mac.

Thanks,

Billy

5条回答
戒情不戒烟
2楼-- · 2019-06-07 05:33

i thought it was something like

/Library/Application\ Support/iPhone\ Simulator/.../your.app.id/..

have a look. consider that there are two /Library-Folders (in root and in home). sorry for the unprecise answer.

查看更多
等我变得足够好
3楼-- · 2019-06-07 05:37

All your projects folders are located here:

~/Library/Application\ Support/Titanium/appdata/

They are sorted by app ID. In each folder you'll find a Databases.db file which contents your DBs if the app has one.

查看更多
聊天终结者
4楼-- · 2019-06-07 05:48

/data/data/your.app.id/databases/

查看更多
在下西门庆
5楼-- · 2019-06-07 05:51

For android , the location is /data/data/your.app.id/databases/

Ordinary, you could not direct see the file, unless you got the root permission。

And, you can use adb series command to get the file to you develop computer, and analyze the db file on you desktop computer.

For iOS, best way to see the db file is run the app in you simulater. the db file usually store at location simalar as this

/Users/[your name]/Library/Application Support/iPhone Simulator/7.1/Applications/3CE12954-6C8A-48E1-BF71-CF483E01CBA1/Library/Private Documents
查看更多
老娘就宠你
6楼-- · 2019-06-07 05:51

The path is at

~/Library/Developer/CoreSimulator/Devices/{DEVICEID}/data/Containers/Data/Application/{APP_WEIRD_ID}/Library/Private Documents/

查看更多
登录 后发表回答