I am using a Windows 7 64 bit computer and a 2015 Mac Mini to compile the same app for Android (4.1.1 and above) and iOS (8 and above). Both environments are working from the same code base.
I have the following plugins installed:
- com.synconset.imagepicket 1.0.7
- cordova-plugin-camera 1.2.0
- cordova-plugin-crosswalk-webview 1.0.0
- cordoba-plugin-file 3.0.0
- cordova-plugin-geolocation 1.0.1
- cordova-plugin-google-analytics 0.8.1
- cordova-plugin-inappbrowser 1.1.1
- cordova-plugin-network-information 1.1.0
- cordova-plugin-whitelist 1.0.0
- cordova-sqlite-storage 0.7.15-pre
I also have the following folders in
My version of Cordova is 5.4.1.
My app opens a database at certain points within
app.js is loaded before
services.js in my
db = $cordovaSQLite.openDB("mydb.db");
Any and all calls to the database, including those contained within
app.js, work fine on Android, but fail on iOS. I have tried using cordovaSQLite on a generation 2 iPad with iOS 9.2 as well as an iPhone 6s Plus in Simulator. Simulator returns the following error when inspecting in Safari:
Error: undefined is not an object(evaluating 'n.sqlitePlugin.openDatabase') openDB@file:///<...>ng-cordova.min.js:9:17883
None of the usual answers on this topic have been of any help to me since most topics seem to be solved by just wrapping in
$ionicPlatform.ready(), but I’ve already done that and it only works on one platform. Can anyone please point me in the right direction to solve this discrepancy?
Thanks in advance.