I'm building a mobile app using Ionic. I've installed pouchDB (latest version 5.2.1) and have it saving data. I've also installed the SQLlite cordova plugin (http://ift.tt/1O3yCJy). As per their docs (see section titled SQLite plugin for Cordova/PhoneGap) if the SQLlite plugin is present PouchDB should automagically use this (also mentioned in various blogs). To test pouch is using the SQLlite plugin they recommend you running db.info().then(console.log.bind(console));.
When I do this I get:
{"doc_count":2,"update_seq":104,"sqlite_plugin":false,"websql_encoding":"UTF-8","db_name":"test","auto_compaction":true,"adapter":"websql"}
This is the problem. My app doesn't seem to be using SQLlite to store the data from what I can tell.
I've build the app and deployed using xcode to my device. Using Safari remote debugger I've inspected the app and verified window.sqlitePlugin is available in the console, which gives me:
{sqliteFeatures: {isSQLitePlugin: true}, echoTest: function, openDatabase: function, deleteDatabase: function} = $1.
Why is my app not using the plugin to store the data?
Are there any more checks I can do? I don't seem to be able to see any DB specific files in xcode, I have however noticed that in Xcode under build targets -> frameworks that libz.dylib, libsqlite3.dylib and libiconv.dylib are red and therefore missing.
Could this be the issue? I've crawled SO and tried adding the .tbd files but that doesn't seem to do anything...
Version number which may be helpful:
- Cordova CLI: 6.0.0
- Gulp version: CLI version 3.9.0
- Gulp local: Local version 3.9.0
- Ionic Version: 1.1.1
- Ionic CLI Version: 1.7.14
- Ionic App Lib Version: 0.7.0
- ios-deploy version: 1.8.5
- ios-sim version: 5.0.6
- Node Version: v5.0.0
- Xcode version: Xcode 7.2.1 Build version 7C1002
Aucun commentaire:
Enregistrer un commentaire