On 20 Dec 2016, at 18:51, Jens Alfke <j...@mooseyard.com> wrote: > It looks as though this just returns the first component of the name, which > needs to have “.local” appended; is this correct?
Yes. > But I also need this to work on iOS, and that function’s not available there. On iOS I would register a service in `local.` and resolve that. IMPORTANT: You’re looking for NSNetService’s `hostName` property; the `name` property gives you the computer name (equivalent to `SCDynamicStoreCopyComputerName`). Please do file a bug against iOS for not having a better way to get this. It seems like it would be a good fit for NSProcessInfo, which already has a `hostName` property that returns the `gethostname` value (and also supports KVO for various other properties like this). <https://developer.apple.com/bug-reporting/> Please post the bug number so that I can associate it with this incident. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to arch...@mail-archive.com