How do I implement this method (see below)? I'm new to Objective-C and I'm just not getting it right.
From: http://lists.apple.com/archives/Webkitsdk-dev/2008/Apr/msg00027.html
By default databases have a quota of 0; this quota must be increased before any database will be stored on disk.
WebKit clients should implement the WebUIDelegate method
- webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:and increase the quota as desired when that method is called. This method is defined in WebUIDelegatePrivate.h. It was added too late in the previous release cycle to make it into a non-private header. It would be worthwhile to file a bug about moving this call to WebUIDelegate.h so that it is part of the official API.
John
In whatever class you've defined as the delegate for your WebView you need to implement that method, something like this:
- (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier {
unsigned long long newQuotaBytes = 10 * 1024 * 1024;
[origin setQuota:newQuotaBytes];
// origin also responds to -usage method to return current size for all databases in this origin
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With