An Internet of things

Musings on AI, Software Engineering, IoT and other bits and pieces

Herald: A Bonjour Browser for iOS

Herald is a small iOS app I built that shows you every Bonjour (mDNS/DNS-SD) service announcing itself on your local network: AirPlay speakers, printers, HomeKit accessories, Thread border routers, Matter devices and more. It’s free, open source and on the App Store.

Herald All Services list
All Services
Herald service detail view
Service Detail

Why

My own home network contains a growing collection of smart home gear. When something stops showing up in the Home app, or a Matter device won’t commission, I always fell back to looking through DNS traffic to see what is this device actually announcing. On a Mac you can answer that with dns-sd -B in a terminal so I thought making it available to iOS devices in a modern UI would be a good project.

Features

  • All Services: browse 45+ Bonjour service types (HTTP, SSH, AirPlay, HomeKit, printers) in one searchable list, grouped by type with human-readable descriptions and live counts.
  • Service Detail: tap a service to resolve its hostname, port, IPv4/IPv6 addresses and TXT records, with labels for the keys that are documented.
  • Thread Network: Thread border routers, TREL peers, SRP servers and Matter commissioners, with decoded network name, vendor, model and Thread version.
  • Matter Devices: commissionable Matter devices with vendor lookup, device type, commissioning mode and discriminator.
  • Export: share what you’ve found as JSON or plain text.
Herald Thread Network view
Thread Network
Herald Matter Devices view
Matter Devices

Under the hood

Herald is Swift and SwiftUI, targeting iOS 17+. Discovery goes through Apple’s low-level dns_sd C API (DNSServiceBrowse, DNSServiceResolve), talking directly to mDNSResponder. The flow is simple: read the known service types, browse instances of each type, and only resolve a service’s details when you tap on it.

The biggest gotcha is iOS Local Network Privacy. Since iOS 14, every Bonjour API, including the C API, is checked against the NSBonjourServices list in your Info.plist. Browse for a type that isn’t listed and you get -65555 (kDNSServiceErr_NoAuth). The Simulator doesn’t enforce this, so everything works fine until you run it on a real phone. Herald currently declares each type it browses up front. The way around that is the restricted com.apple.developer.networking.multicast entitlement, which you have to ask Apple for.

The other piece of work that took real effort was TXT records. They’re just key/value pairs, and most vendors don’t document theirs. I went through the TXT records from the devices on my own network and checked the labels against whatever specs I could find, so the detail view shows Thread Version where it can instead of a bare tv=.