I'm about to rebuild an application originally written in Appcelerator's Titanium into a fully native iOS app written in Swift.
The app relies heavily on the SQLite database created using Titanium Alloy Models, whereby users save items into their local database on their phone. I need this data to be accessible when the user updates their app with the newly rebuilt version.
Here are my questions:
Please note I need to achieve this in Swift - not Objective C
Note, what I'm doing is basically the reverse of this question: Titanium - Retrieving SQLite Data from previous version of iOS App
Unless you tell it otherwise, Alloy will generate a _alloy_
database at the location documented under Ti.Database.open() .
Unless you specify an idAttribute
in your model adapter config, Alloy will create an alloy_id
UNIQUE TEXT
column to store the unique guid for each model.
Apart from that, it's a plain old SQLite database that you can access from Swift.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.