我想通过在控制台中打印来获取本地数据库路径。我尝试了以下代码:
Ti.API.info(Ti.Filesystem.applicationDataDirectory);
答案 0 :(得分:0)
在https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Database-method-open上查看文档
var db = Ti.Database.open('mydb1Installed');
iOS:
在模拟器上
/Users/<user name>/Library/Application Support/iPhone Simulator/<iOS version>/Applications/<apple app id>/Library/Private Documents/mydb1Installed.sql
在设备上
/Applications/<apple app id>/Library/Private Documents/mydb1Installed.sql
Android:
file:///data/data/appID/databases/mydb1Installed