NSNetService is deprecated, how to advertise network service that is written using non-Apple API?

I’m, using NSNetService in macOS & iOS to advertise a network service that is written in a cross-platform way using C++. Using the new Network framework, advertising via NWListener.Service seems only possible if the network interface is also written using NWListener. How can I advertise my network service via Bonjour without using the now deprecated NSNetService?

Thanks for any advise.

Accepted Reply

[I have] a network service that is written in a cross-platform way using C++. … How can I advertise my network service via Bonjour without using the now deprecated NSNetService?

I’d use DNS-SD for this. If you need with that low-level API, check out the DNSSDObjects sample code.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Awesome, exactly what I was looking for. Thanks, and have a good day!

Add a Comment

Replies

I would be very interested if anything besides the Bonjour C-API (e.g. DNSServiceRegister) is still supported on macOS & iOS.

[I have] a network service that is written in a cross-platform way using C++. … How can I advertise my network service via Bonjour without using the now deprecated NSNetService?

I’d use DNS-SD for this. If you need with that low-level API, check out the DNSSDObjects sample code.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Awesome, exactly what I was looking for. Thanks, and have a good day!

Add a Comment