-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve local storage #25
Comments
It seems that the Cocoa WebView not support localStorage now. I have to find a hack way to implement it. |
I was looking at this example "Enabling localStorage": http://www.lostdecadegames.com/completing-your-native-mac-osx-app-built-in-h/ And looks like it might be possible using something like: var prefs: WebPreferences = webView.preferences()
prefs._setLocalStorageDatabasePath("~/Library/<APP_NAME>/LocalStorage") But really not sure where this configuration would be set? |
There is no method called |
@djyde (bug on iOS) http://stackoverflow.com/questions/18964410/localstorage-no-longer-working-in-ios-7-webview But the problem with the we have @chesleybrown http://www.lostdecadegames.com/completing-your-native-mac-osx-app-built-in-h/ Updatehttp://stackoverflow.com/questions/28174541/how-to-access-ios-private-apis-in-swift We'll need to access the private API's also to fix #23 |
Update: Tried (Objective-C Bridging header):
And then:
And it's not working. Notes:
i think the best option is that we'll grab the local storage items and put them in a NSUserDefaults? or something like that. (a better option is Core Data) but i don't know how to use it. |
Update got something working (after reboot).
Now i only need to build a timer, to get them all saved for re-use. |
@wdg great job! |
From what I can tell, local storage is not preserved after quitting the WebShell application. This means for applications that use local storage to save information such as authentication tokens, they are lost when exiting the application resulting in the user having to re-login.
Any idea on how to get local storage to be preserved after exiting the application?
The text was updated successfully, but these errors were encountered: