问题
I am working on Ionic 2 application with Typescript. For setting up preferences I wish to use the cordova plugin https://github.com/chrisekelley/AppPreferences/.
There are a few things I am strugling with. After a lot of googling there are a few things that I am not yet able to figure out. It would be great If anyone can help.
Using the above Cordova Plugin with Ionic 2. There are a few posts on the internet which got me to where I am currently. But most of them refer to javascript so dont help completely. How do I use and access the plugin methods in typescript as this is not an ionic-native plugin?
Secondly, I understand on IOS a plist file will be generated which can be modified from Application Settings in IOS as a means to update settings. How and where can I have a similar page/functionality on android?
回答1:
I would recommend that you instead use SqlStorage to persist data like preferences, as it is directly supported by ionic. If you do so, you need to install the sqlite plugin ionic plugin add cordova-sqlite-storage
来源:https://stackoverflow.com/questions/37640077/ionic-2-cordova-and-typescript-app-preferences-plugin