Welcome! › Forums › Unity Plugins › In-App Web Browser › localStorage support? › Reply To: localStorage support?
May 5, 2018 at 5:08 pm
#1071
Piotr
Keymaster
Thanks for those explanations.
So it seems it does not support, although it should be really easy to add.
Open iOSInAppBrowser.mm
from Plugins/iOS
directory and add that line:
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitStoreWebDataForBackup"];
just after _OpenInAppBrowser
declaration.
So it should look like that:
void _OpenInAppBrowser(char *URL, struct DisplayOptions displayOptions) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitStoreWebDataForBackup"];
NSString *urlAsString = [NSString stringWithUTF8String:URL];
_ShowURLWithDisplayOptions(urlAsString, displayOptions);
}
Let me know if that worked for you.
- This reply was modified 6 years, 4 months ago by Piotr.