You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have upgraded to Cordova iOS 6.1.1. After doing this my app started getting CORS issues. To get around CORS issues I added custom scheme as recommended by the Cordova iOS 6.0.0 release notes:
Additionaly, WKURLSchemeHandler support has been introduced with this release. Using a custom scheme to serve your app content through fixes CORS issues that exist because of the strict security policies that WKWebView has applied to the file scheme. You can easily configure your Cordova project to use a custom scheme by setting the preference options scheme and hostname in the config.xml file.
My CORS issues have gone away, but now my app fails to open due to a JavaScript error with this plugin which I suspect is related to using the custom scheme.
Message: typeError: "undefined is not an object (evaluating 'window.sqlitePlugin.openDatabase')"
SourceURL: "app://localhost/main.c60b13ae740b88e19f4a.js"
(I don't currently have access to XCode logs, so above is just an alert from window.onerror).
This plugin works on earlier versions of Cordova iOS when I'm not using a custom scheme, and also works on Android, so I don't think it's an issue with how I call the plugin (I also can confirm I'm calling openDatabase after deviceready event fires).
The text was updated successfully, but these errors were encountered:
Interestingly, on rare occasions (maybe 1/20 times I open the app) it works without the above error (it also works on Android 100% of the time), leading me to believe it maybe is related to a race condition. I think it's possible deviceready is firing but the plugin is still not ready to have window.sqlitePlugin.openDatabase called. I have checked my code (and added logging) and I'm certain I'm not making the call until deviceready fires, but the behaviour I'm seeing indicates the plugin isn't loaded and ready to use.
I have upgraded to Cordova iOS 6.1.1. After doing this my app started getting CORS issues. To get around CORS issues I added custom scheme as recommended by the Cordova iOS 6.0.0 release notes:
My CORS issues have gone away, but now my app fails to open due to a JavaScript error with this plugin which I suspect is related to using the custom scheme.
Message: typeError: "undefined is not an object (evaluating 'window.sqlitePlugin.openDatabase')"
SourceURL: "app://localhost/main.c60b13ae740b88e19f4a.js"
(I don't currently have access to XCode logs, so above is just an alert from window.onerror).
This plugin works on earlier versions of Cordova iOS when I'm not using a custom scheme, and also works on Android, so I don't think it's an issue with how I call the plugin (I also can confirm I'm calling openDatabase after deviceready event fires).
The text was updated successfully, but these errors were encountered: