Apache Cordova
  1. Apache Cordova
  2. CB-456

Localstorage across program runs seems impossible in the Mac

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: OSX
    • Labels:

      Description

      Reported by: Ray Wang https://github.com/winterlightning

      The biggest problem I ran into developing in cocoa webkit is this: (I asked the first question)

      http://stackoverflow.com/questions/8594822/how-do-you-set-localstorage-so-it-persist-across-program-runs
      http://stackoverflow.com/questions/8198453/local-storage-in-webview-is-not-persistent

      If someone has a proof of concept where localstorage actually works in cocoa webkit that would be great

        Activity

        Hide
        Filip Maj added a comment -

        I've added this to the core api audit wiki article for tracking.

        http://wiki.apache.org/cordova/Core%20API%20Audit

        Show
        Filip Maj added a comment - I've added this to the core api audit wiki article for tracking. http://wiki.apache.org/cordova/Core%20API%20Audit
        Hide
        Adam George added a comment -

        I was able to get localStorage working in an OSX app. But I used MacGap (a fork of Phonegap)

        I had to tinker around a bit:
        http://stackoverflow.com/questions/10609644/localstorage-not-persisting-in-osx-app-xcode-4-3

        I also had to use a private API `_setLocalStorageDatabasePath`, so don't know how that will go down with the approval process. I'll find out after I submit I guess.

        Would be good to see a proper fix for this in Cordova.

        Show
        Adam George added a comment - I was able to get localStorage working in an OSX app. But I used MacGap (a fork of Phonegap) I had to tinker around a bit: http://stackoverflow.com/questions/10609644/localstorage-not-persisting-in-osx-app-xcode-4-3 I also had to use a private API `_setLocalStorageDatabasePath`, so don't know how that will go down with the approval process. I'll find out after I submit I guess. Would be good to see a proper fix for this in Cordova.
        Show
        Shazron Abdullah added a comment - Was fixed: https://github.com/apache/cordova-osx/commit/cdf7f295cbcbfcc35ecb25ded1cad50e8c4e7a11
        Hide
        Adam George added a comment -

        Thanks. I think there's an issue with that fix though. When restarting the app, the localStorage file is missing/relocated. I've entered a new ticket here: https://issues.apache.org/jira/browse/CB-4319

        Show
        Adam George added a comment - Thanks. I think there's an issue with that fix though. When restarting the app, the localStorage file is missing/relocated. I've entered a new ticket here: https://issues.apache.org/jira/browse/CB-4319

          People

          • Assignee:
            Unassigned
            Reporter:
            Shazron Abdullah
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development