Re: Resolve alternative TLD
Re: Resolve alternative TLD
- Subject: Re: Resolve alternative TLD
- From: Diederik Meijer | Ten Horses <email@hidden>
- Date: Fri, 04 Jul 2014 23:52:43 +0200
Thanks Jens, will try all that over the coming days
Op Jul 4, 2014, om 11:13 PM heeft Jens Alfke <email@hidden> het volgende geschreven:
>
> On Jul 4, 2014, at 1:24 PM, Diederik Meijer | Ten Horses <email@hidden> wrote:
>
>> I have no experience with this sort of thing, hopefully I can make that work with NSURLConnection or -Session..
>
> If you register an NSURLProtocol, it will be used by anything (in your process) that uses NSURLConnection or NSURLSession. That includes UIWebViews.
>
> Basically, when you register a protocol class, it’ll be called for every request and gets a chance to claim it or not. You’d just claim any request where the NSURL’s host matched your custom domain. Then you have to handle the request by returning an NSURLResponse and a sequence of NSData objects. In your case you’d start up an NSURLConnection of your own (with the hostname changed to a hardcoded IP address) and delegate to that.
>
> —Jens
_______________________________________________
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