cordova-plugin-nativestorage: callbacks don't seem to work on iOS 10 beta 7
First I wanted to thank you for the awesome plugin ๐
On iOS 10 (beta 7) the global NativeStorage Object is accessible, along with all documented methods. Unfortunately none of the callbacks get executed.
This example code works in iOS 9 but gives no output whatsoever (web Inspector, xcode console) in iOS 10:
NativeStorage.setItem('sample', 'abc', function () {console.log(arguments)}, function () {console.log(arguments)})
I know itโs still beta but do you plan on adding iOS 10 support?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19
@alokrajiv:
In your
index.htmlthat you are loading on app startup, add the following entries to your Content-Security-Policy meta tag:gap://ready file:An example of a โliberalโ CSP which should enable pretty much all content (not really recommended) is:
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' 'unsafe-eval' 'self' gap://ready file: ws://<url to ws endpoint> cdvfile:; child-src * 'unsafe-inline' 'unsafe-eval' blob:; img-src * 'self' data: blob:;" />Remove what you donโt need, and specify
<url to ws endpoint>if you use websockets.Will this work for Ionic 2? Adding this to index.html does not fix the issue.