[
https://issues.apache.org/jira/browse/CB-9008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14562408#comment-14562408
]
Shazron Abdullah commented on CB-9008:
--------------------------------------
This might be a domain and port thing. The localserver chooses a random port
everytime, so the next app launch any localstorage and indexeddb data would be
lost since it is tied to the domain:port location when it was stored.
You could try setting the port to a fixed one (content tag in your project
root's config.xml).
Find:
{code}
<content src="http://localhost:0" />
{code}
... and change that "0" to a number between 1 and 65535 (there's a possibility
of a port conflict, so try not to use the common ports).
> IndexedDB does not persist in WKWebView after closing app
> ---------------------------------------------------------
>
> Key: CB-9008
> URL: https://issues.apache.org/jira/browse/CB-9008
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Environment: iOS 8.3, iPhone
> Reporter: Nolan Lawson
> Fix For: 4.0.0
>
>
> I realize y'all are actively developing WKWebView support. This may be a bug
> in WKWebView itself, or maybe in Cordova; I'm not sure. Hence this bug
> report. :)
> [Video demonstration |
> https://nolanlawson.s3.amazonaws.com/www/apache/iphone_recording.webm]
> Steps to repro:
> 1. Install my [database filler app |
> https://github.com/nolanlawson/database-filler]
> 2. Follow the instructions to run the WKWebView branch
> 3. Open up the XCode project in platforms/ios
> 4. Run on a real device
> 5. Open up the app, add some data, count it to make sure items were added.
> 6. Double-press the home button to dismiss the app
> 7. Reopen it, count items
> **Expected**: items that were saved in IndexedDB before are still there.
> **Actual**: 0 items are found.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]