Hi, BareFeetWare
NSURLProtocol is also can be used in iOS cocoatouch, you can check
this example
http://code.google.com/p/tkawebview/downloads/detail?name=tkaurlprotocol.zip&can=2&q=
this is a open source url protocol, but still have some bug,
1. however I think you can use + requestIsCacheEquivalent:toRequest: to
check which resource to get from cache and which to start a new request
2. if you want get the resource requested by UIWebView, you can override
the UIWebView method like this link
http://stackoverflow.com/questions/3155359/in-webkit-how-do-i-get-the-content-of-a-resourcemetioned
- (NSURLRequest*) webView:(WebView*)sender
resource:(id)identifier
willSendRequest:(NSURLRequest*)request
redirectResponse:(NSURLResponse*)redirectResponse
fromDataSource:(WebDataSource*)dataSource
and if you want make all thing more safe, you can check this link
http://stackoverflow.com/questions/1637604/method-swizzle-on-iphone-device
2012/6/21 BareFeetWare <[email protected]>
> > On Cocoa, You can intercept the WebView requests using a custom
> NSURLProtocol. There is a fairly complete example here:
> >
> >
> http://stackoverflow.com/questions/3155359/in-webkit-how-do-i-get-the-content-of-a-resource
>
> Hi Jason,
>
> Thanks for your answer. Unfortunately, as you probably know, this doesn't
> help for my UIWebView on CocoaTouch (iOS).
>
> Thanks,
> Tom
>
>
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/yinjiaji110%40gmail.com
>
> This email sent to [email protected]
>
--
Fykec Yin
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]