0

I have a websql database, that I'd like to point to the same location as local storage.

I can easily set the localstorage path with this (private) method:

    [preferences _setLocalStorageDatabasePath:savePath];

However I can't find something similar for the WebSQL database. I read this post, but am confused what to do:

Can a WebKit-based Mac app use HTML5 databases from Safari?

I added WebDatabaseDirectory to my plist and pointed it to ~/Library/Application Support/MyApp but that doesn't seem to do anything.

What am I doing wrong?

Community
  • 1
  • 1

1 Answers1

0

I'm not familiar with that theme, but maybe the following hints help you come forward:

Check the superclasses in the documentation for a command. WebSQL is no longer maintained since 2013, so I think using it, is not the best idea. SQLite could be used with core data.

I also checked and read your links, where "When you aren't using Safari, it appears that databases are written to ~/Library/WebKit/Databases..." and "... set the WebDatabaseDirectory default to make your application use the same directory structure as Safari, which appears to be ~/Library/Safari/Databases".

A database should not be stored in Application Support.

macrene
  • 198
  • 1
  • 8