Re: Overriding NSHTTPCookieStorage for WebView
Re: Overriding NSHTTPCookieStorage for WebView
- Subject: Re: Overriding NSHTTPCookieStorage for WebView
- From: Mike Abdullah <email@hidden>
- Date: Mon, 29 Dec 2008 23:25:30 +0000
The system really isn't designed for this sort of thing sadly :( How
about instead, setting up a WebResourceLoadDelegate to modify all
outgoing URL requests doing:
[aRequest setHTTPShouldHandleCookies:NO]
You can then again use the WebResourceLoadDelegate methods to receive
the URL response and handle the cookie from it as you'd like.
Mike.
On 29 Dec 2008, at 17:17, Mr. Gecko wrote:
Well I'm not wanting to use the default cookie system because I'm
trying to make a secure browser which wont save the cookies and
would reset the cookies if inactive and so on so forth.
I did some more tests and tried to do poseAsClass in the main and I
get this message in the debug output
objc[87202]: MYHTTPCookieStorage: [MYHTTPCookieStorage
poseAs:NSHTTPCookieStorage]: target not immediate superclass
I don't know what that means, because I'm using NSObject as the
superclass. Do I have to use NSHTTPCookieStorage as the superclass?
This is how my main looks like.
#import <Cocoa/Cocoa.h>
#import "MYHTTPCookieStorage.h"
int main(int argc, char *argv[])
{
[[MYHTTPCookieStorage class] poseAsClass:[NSHTTPCookieStorage
class]];
return NSApplicationMain(argc, (const char **) argv);
}
Thanks for the help,
Mr. Gecko
On Dec 29, 2008, at 10:57 AM, Mike Abdullah wrote:
Perhaps you could explain why you've felt the need to write a
custom cookie storage system? I think it would help us figure the
best solution. Bear in mind that NSHTTPCookieStorage's design is
quite complicated in that it synchronises with all instances in
other apps.
Mike.
On 29 Dec 2008, at 01:52, Mr. Gecko wrote:
Hello, I'm trying to make my own cookie storage system for WebView
and to do that I've found that I need to override
NSHTTPCookieStorage but when I do that how can I make webview use
my overridden one?
I've already wrote the cookie system, following the rules of
cookie security and all, I just need to get this working...
Thanks for the help,
Mr. Gecko
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden