Re: Resolve alternative TLD

2014-07-04 Thread Uli Kusterer
On 03 Jul 2014, at 22:54, Jens Alfke j...@mooseyard.com wrote:
 On Jul 3, 2014, at 1:33 PM, Diederik Meijer | Ten Horses 
 diede...@tenhorses.com wrote:
 
 So I guess I somehow need to handle DNS Lookup / IP resolving myself, is 
 there anybody here who has any idea how to proceed?
 
 If this were Mac OS you could edit /etc/hosts and add an entry for that 
 domain, but that won’t fly on iOS.
 
 You can set up a local nameserver (bind or something like that) and configure 
 it with a hardwired entry for that domain, then point the local WiFi router 
 to use that nameserver as the DNS address it advertises via DHCP.

 One thought: On OS X you could probably also register a URL scheme of your own 
(or override an existing URL scheme) by hooking into the URL loading system. 
Not sure whether that API is available on iOS, but might be worth looking into 
as a hook-in point for a manual DNS resolution: Check if the URL is IPv4 or 
IPv6 raw IP, if not, resolve, then redirect to the raw URL. Also, I haven't 
looked into what has actually changed, but there have been lots of WebKit 
changes for iOS 8, so if you can require that, you might have additional API to 
solve this problem with.

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.zathras.de


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: Resolve alternative TLD

2014-07-04 Thread Sal Conigliaro
If you prefix it with 'http:', then the browser can resolve the name.

Sal

-- 
Sal Conigliaro,
e design
http://www.erinedesign.com
@sconig

On Fri, Jul 4, 2014 at 3:00 PM, cocoa-dev-requ...@lists.apple.com wrote:


 Date: Thu, 03 Jul 2014 22:33:21 +0200
 From: Diederik Meijer | Ten Horses diede...@tenhorses.com
 To: Alex Zavatone z...@mac.com
 Cc: cocoa-dev@lists.apple.com Developers cocoa-dev@lists.apple.com
 Subject: Re: Resolve alternative TLD
 Message-ID: ca1308a5-9c7d-4214-a2a1-2206d9a8e...@tenhorses.com
 Content-Type: text/plain; charset=windows-1252

 This is what it looks like in the Sundial browser:
 http://www.tenhorses.com/sundial.png

 So I guess I somehow need to handle DNS Lookup / IP resolving myself, is
 there anybody here who has any idea how to proceed?

 Thanks!





 Op Jul 3, 2014, om 7:31 PM heeft Alex Zavatone z...@mac.com het volgende
 geschreven:

  Firefox doesn't resolve start.rental either.
  Neither does Chrome.
 
  On Jul 3, 2014, at 12:58 PM, Diederik Meijer | Ten Horses wrote:
 
  Take start.rental as an example, has a live server on the dot rental
 TLD, but no standard browser will resolve it, try it in Safari, you'll see..
 
  Verstuurd vanaf mijn iPhone
 
  Op 3 jul. 2014 om 18:22 heeft Jens Alfke j...@mooseyard.com het
 volgende geschreven:
 
 
  On Jul 3, 2014, at 6:52 AM, Diederik Meijer | Ten Horses 
 diede...@tenhorses.com wrote:
 
  The issue being that the TLD (think for example: domain.law, with law
 being the TLD) is accessible through a DNS server, but since the TLD is not
 officially registered with ICANN, standard browsers do not resolve the
 domain into an IP address. Using a standard UIWebView does not work. But, I
 repeat, the server is up and running and the domain is accessible through
 the network.
 
  Really? I’m not aware of anything built into browsers that restricts
 them to a fixed set of “official” TLDs. As far as I know, the client simply
 hands off _any_ hostname for DNS lookup, which will query the configured
 DNS server(s).
 
  Are you 100% sure that the DNS is configured correctly? For example,
 the name server (or some parent of it) needs to have a custom entry for
 “.law”, otherwise it will end up querying upstream for it, and the upstream
 (ISP) name servers won’t know about that TLD.
 
  Also, are you 100% sure that the iOS device is configured to access
 the DNS server that knows about your custom domain? It’s probably getting
 the name server IP addresses via DHCP.
 
  —Jens
 
  PS: This question really belongs on the macnetworkprog mailing list.
 There are Apple networking gurus hanging out there who don’t monitor
 cocoa-dev.
  ___
 
  Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
  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/zav%40mac.com
 
  This email sent to z...@mac.com
 
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: Resolve alternative TLD

2014-07-04 Thread Jens Alfke

On Jul 4, 2014, at 4:27 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote:

 On OS X you could probably also register a URL scheme of your own (or 
 override an existing URL scheme) by hooking into the URL loading system. Not 
 sure whether that API is available on iOS, but might be worth looking into as 
 a hook-in point for a manual DNS resolution

Yes, NSURLProtocol is available on iOS (all versions), and it could be used 
this way.

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: Resolve alternative TLD

2014-07-04 Thread Sal Conigliaro
Let me clarify:

The 'start.rentals' domain is *not* a valid domain. The root servers for
.rentals
have no info on it:

 set q=ns

 rentals

Server: 192.168.123.1

Address: 192.168.123.1#53


Non-authoritative answer:

rentals nameserver = demand.beta.aridns.net.au.

rentals nameserver = demand.alpha.aridns.net.au.

rentals nameserver = demand.gamma.aridns.net.au.

rentals name server = demand.delta.aridns.net.au.


 set q=a

 start.rentals

Server: 192.168.123.1

Address: 192.168.123.1#53


** server can't find start.rentals: NXDOMAIN

 server demand.beta.aridns.net.au

Default server: demand.beta.aridns.net.au

Address: 37.209.194.7#53


 start.rentals.

Server: demand.beta.aridns.net.au

Address: 37.209.194.7#53


** server can't find start.rentals.: NXDOMAIN


For valid 'vanity' TLDs, you must prefix it with 'http:' in order for
Safari to resolve it; otherwise it simply performs a search on that term.


Whoever registered 'start.rentals' needs to follow up with their registrar.


Sal


On Fri, Jul 4, 2014 at 3:56 PM, Sal Conigliaro s...@erinedesign.com wrote:

 If you prefix it with 'http:', then the browser can resolve the name.

 Sal

 --
 Sal Conigliaro,
 e design
 http://www.erinedesign.com
 @sconig

 On Fri, Jul 4, 2014 at 3:00 PM, cocoa-dev-requ...@lists.apple.com wrote:


 Date: Thu, 03 Jul 2014 22:33:21 +0200
 From: Diederik Meijer | Ten Horses diede...@tenhorses.com
 To: Alex Zavatone z...@mac.com
 Cc: cocoa-dev@lists.apple.com Developers cocoa-dev@lists.apple.com
 Subject: Re: Resolve alternative TLD
 Message-ID: ca1308a5-9c7d-4214-a2a1-2206d9a8e...@tenhorses.com
 Content-Type: text/plain; charset=windows-1252

 This is what it looks like in the Sundial browser:
 http://www.tenhorses.com/sundial.png

 So I guess I somehow need to handle DNS Lookup / IP resolving myself, is
 there anybody here who has any idea how to proceed?

 Thanks!





 Op Jul 3, 2014, om 7:31 PM heeft Alex Zavatone z...@mac.com het
 volgende geschreven:

  Firefox doesn't resolve start.rental either.
  Neither does Chrome.
 
  On Jul 3, 2014, at 12:58 PM, Diederik Meijer | Ten Horses wrote:
 
  Take start.rental as an example, has a live server on the dot rental
 TLD, but no standard browser will resolve it, try it in Safari, you'll see..
 
  Verstuurd vanaf mijn iPhone
 
  Op 3 jul. 2014 om 18:22 heeft Jens Alfke j...@mooseyard.com het
 volgende geschreven:
 
 
  On Jul 3, 2014, at 6:52 AM, Diederik Meijer | Ten Horses 
 diede...@tenhorses.com wrote:
 
  The issue being that the TLD (think for example: domain.law, with
 law being the TLD) is accessible through a DNS server, but since the TLD is
 not officially registered with ICANN, standard browsers do not resolve the
 domain into an IP address. Using a standard UIWebView does not work. But, I
 repeat, the server is up and running and the domain is accessible through
 the network.
 
  Really? I’m not aware of anything built into browsers that restricts
 them to a fixed set of “official” TLDs. As far as I know, the client simply
 hands off _any_ hostname for DNS lookup, which will query the configured
 DNS server(s).
 
  Are you 100% sure that the DNS is configured correctly? For example,
 the name server (or some parent of it) needs to have a custom entry for
 “.law”, otherwise it will end up querying upstream for it, and the upstream
 (ISP) name servers won’t know about that TLD.
 
  Also, are you 100% sure that the iOS device is configured to access
 the DNS server that knows about your custom domain? It’s probably getting
 the name server IP addresses via DHCP.
 
  —Jens
 
  PS: This question really belongs on the macnetworkprog mailing list.
 There are Apple networking gurus hanging out there who don’t monitor
 cocoa-dev.
  ___
 
  Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
  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/zav%40mac.com
 
  This email sent to z...@mac.com
 
 






-- 
Sal Conigliaro,
e design
http://www.erinedesign.com
@sconig
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: Resolve alternative TLD

2014-07-04 Thread Diederik Meijer | Ten Horses
That's very promising, thank you!

I have no experience with this sort of thing, hopefully I can make that work 
with NSURLConnection or -Session..

I'll look into the documentation on NSURLProtocol

Thanks again to you both!



Op Jul 4, 2014, om 10:01 PM heeft Jens Alfke j...@mooseyard.com het volgende 
geschreven:

 
 On Jul 4, 2014, at 4:27 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote:
 
 On OS X you could probably also register a URL scheme of your own (or 
 override an existing URL scheme) by hooking into the URL loading system. Not 
 sure whether that API is available on iOS, but might be worth looking into 
 as a hook-in point for a manual DNS resolution
 
 Yes, NSURLProtocol is available on iOS (all versions), and it could be used 
 this way.
 
 —Jens

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: Resolve alternative TLD

2014-07-04 Thread Jens Alfke

On Jul 4, 2014, at 1:24 PM, Diederik Meijer | Ten Horses 
diede...@tenhorses.com 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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: Resolve alternative TLD

2014-07-04 Thread Diederik Meijer | Ten Horses
Thanks Jens, will try all that over the coming days


Op Jul 4, 2014, om 11:13 PM heeft Jens Alfke j...@mooseyard.com het volgende 
geschreven:

 
 On Jul 4, 2014, at 1:24 PM, Diederik Meijer | Ten Horses 
 diede...@tenhorses.com 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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

awakeFromNib multiple objects - all connected?

2014-07-04 Thread Trygve Inda
I have a nib that has several custom objects instantiated in it:

NIB
-ObjectA // contains outlets ABC
-ObjectB // contains outlets DEF


When object A receives awakeFromNib, I know that outlets A, B and C are
hooked up, but it is also safe to call a method in ObjectB that requires
ObjectB to have it's D, E  F outlets already hooked up?


ObjectA has an outlet to ObjectB so calliong a method in ObjectB is fine,
but ObjectB may not have received its awakeFromNib yet.

So the bottom line is:

When an object in a nib receives awakeFromNib are all the outlets throughout
the entire nib hooked up, or only those outlets in the object that is
receiving awakeFromNib?

Thanks,

Trygve



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Robert Martin
The nib is only ‘awake’ after all connections in the graph have been made.

On Jul 4, 2014, at 11:18 PM, Trygve Inda cocoa...@xericdesign.com wrote:

 So the bottom line is:
 
 When an object in a nib receives awakeFromNib are all the outlets throughout
 the entire nib hooked up, or only those outlets in the object that is
 receiving awakeFromNib?


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Jens Alfke

On Jul 4, 2014, at 8:18 PM, Trygve Inda cocoa...@xericdesign.com wrote:

 When an object in a nib receives awakeFromNib are all the outlets throughout
 the entire nib hooked up, or only those outlets in the object that is
 receiving awakeFromNib?

All the outlets are hooked up. But not all the other objects in the nib have 
run their -awakeFromNib methods yet, so you have to be cautious about calling 
into other objects in the nib during your -awakeFromNib implementation.

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Trygve Inda
 The nib is only ‘awake’ after all connections in the graph have been made.
 
 On Jul 4, 2014, at 11:18 PM, Trygve Inda cocoa...@xericdesign.com wrote:
 
 So the bottom line is:
 
 When an object in a nib receives awakeFromNib are all the outlets throughout
 the entire nib hooked up, or only those outlets in the object that is
 receiving awakeFromNib?
 
 

I am just wondering which way is true:

1) all the nib's objects are connected to their outlets and then each object
is sent an awakeFromNib.

2) each object gets its own outlets connected and then is sent awakeFromNob
(so objects that have not yet received awakeFromNib may not have their
objects hooked up).




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Trygve Inda
 
 On Jul 4, 2014, at 8:18 PM, Trygve Inda cocoa...@xericdesign.com wrote:
 
 When an object in a nib receives awakeFromNib are all the outlets throughout
 the entire nib hooked up, or only those outlets in the object that is
 receiving awakeFromNib?
 
 All the outlets are hooked up. But not all the other objects in the nib have
 run their -awakeFromNib methods yet, so you have to be cautious about calling
 into other objects in the nib during your -awakeFromNib implementation.
 
 —Jens

That's fine. My situation is I have a subclass of NSWindowController and
several custom objects:

Owner (MyWindowController)

ControllerA

ControllerB
ControllerC

These are all in the nib and I call init in such a way that Owner is passed
a reference which it stores. When ControllerA gets an awakeFromNib it needs
to call methods in ControllerB and ControllerC that require all the outlets
to be hooked up.

I need to ensure ControllerA runs first so I do this by having an
awakeFromNib in ControllerA, but not in B or C. So that when ControllerA
gets awakeFromNib, it can manage things.

As long as A can call into B  C and know that B  C have their outlets
hooked up, that's fine.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Graham Cox

On 5 Jul 2014, at 1:56 pm, Trygve Inda cocoa...@xericdesign.com wrote:

 As long as A can call into B  C and know that B  C have their outlets
 hooked up, that's fine.

You can rely on all outlets being connected. What you can't rely on is the 
order in which each object's -awakeFromNib is called.

--Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Trygve Inda
 
 On 5 Jul 2014, at 1:56 pm, Trygve Inda cocoa...@xericdesign.com wrote:
 
 As long as A can call into B  C and know that B  C have their outlets
 hooked up, that's fine.
 
 You can rely on all outlets being connected. What you can't rely on is the
 order in which each object's -awakeFromNib is called.
 
 --Graham
 
 
 

Perfect.

And long as one object can receive awakeFromNib, call into another objects
(via an outlet) and THOSE objects will have their outlets connected (even
though they may not have received their own awakeFromNib yet), that will
work.

Thanks!



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com