Max size of WebSQL/SQLite database inside UIWebView (phonegap)

前端 未结 1 1136
死守一世寂寞
死守一世寂寞 2020-12-13 22:29

It seems to have been asked before but I did not find a satisfactory answer.
When creating a IOS Phone gap application, well any html5 application on an IPAD is their a

相关标签:
1条回答
  • 2020-12-13 22:57

    Yes, the WebKit DB is also limited to 5mo.

    You can trick the system with this solution: https://issues.apache.org/jira/browse/CB-330?focusedCommentId=13237796&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13237796

    Or you can use a native SQLite DB (same as WebSQL) with a phonegap plugin. That plugin save the database in the Document folder (or you can specify another folder), and there is no size limit and data is saved by iCloud. (But take care, Apple don't really like apps wasting iCloud storage)

    Here is the Native SQLite phonegap plugin : https://github.com/davibe/Phonegap-SQLitePlugin Regarding this plugin, there are some differences between the WebSQL API, here is an adaptor: https://gist.github.com/2009518

    And if the data are important, you should save it to a server. I wrote a small lib to synchronize the SQlite DB to a server : https://github.com/orbitaloop/WebSqlSync

    0 讨论(0)
提交回复
热议问题