UDP Broadcast Discovery Fails on macOS 15 When Launched via Finder (Regression from Ventura)

We are a hardware manufacturer. Our devices are connected via Ethernet to Mac mini systems, where our custom macOS application is installed and communicates with the connected hardware. The application is signed and deployed as a standard application bundle.

Description

The application performs a UDP broadcast using the Universal Plug and Play (UPnP) discovery mechanism to locate devices connected to the same local network segment.

We have observed a reproducible issue with macOS 15.x (confirmed with 15.1 through 15.4), where the discovery fails under specific circumstances. The behavior is as follows:

  • If the application is launched via Finder (e.g., double-clicked by the user), no device is discovered.
  • If the same binary is launched from the Terminal, discovery works as expected and the connected device is found.
  • Downgrading the affected Mac mini to macOS 14.x (e.g., Sonoma 14.0 or 14.1) restores the expected behavior—discovery works via Finder as well.
  • The issue is observed only on Intel-based Mac minis.
  • On Apple Silicon (ARM-based) Mac minis, the discovery via Finder works correctly, even on macOS 15.4.

What we know

  • The problem is tied to how the network stack or sandboxing behaves when the application is launched via Finder.
  • There are no visible error messages.
  • It is unclear whether the broadcast packet is being blocked, or if the response from the device is dropped or filtered by the system.

Reproduction Steps

  1. Install our signed application bundle on a Mac mini (Intel).
  2. Connect our device via Ethernet to the Mac mini.
  3. Launch the application via Finder – the device is not found.
  4. Quit the application.
  5. Launch the same binary from Terminal – the device is correctly discovered.
  6. Downgrade the same system to macOS 14.x – discovery works in both cases (Finder and Terminal).
  7. Upgrade to macOS 15.x – the issue reappears.

Technical Details

  • macOS Version(s) Affected: 15.x (confirmed with 15.1 through 15.4),
  • Mac mini Model: Intel-based Mac minis
  • Type of Communication: UDP broadcast using UPnP
  • Reproducibility: 100% reproducible with affected macOS versions.
  • Software Environment: Custom application developed by us, running as a user-space application under standard macOS network APIs.
  • No Issues: When the same setup is used on earlier macOS versions.

Request

  • Can you confirm whether this is expected behavior due to changes in macOS 15 (e.g., sandboxing, entitlements, network permissions)?
  • What steps or configuration changes are required to ensure UDP discovery works again when the application is launched via Finder?
  • Are there relevant macOS logs (e.g., Console, system logs) we can inspect for network-related blocks or errors?

We would appreciate any guidance or clarification on how to adapt our application or system configuration to restore expected network discovery behavior.

Thank you in advance for your support!

Answered by DTS Engineer in 840090022

This sounds like you’re bumping into local network privacy. For lots of info about that feature, see TN3179 Understanding local network privacy.

Additionally, implementing UDP broadcasts correctly is a challenge, and bugs in your code tend to manifest in weird ways. I recommend you read through my Extra-ordinary Networking post, and specifically the Broadcasts and Multicasts, Hints and Tips post that it links to. (To be clear, I’m almost certain that your problem in local network privacy, but the techniques discussed in Extra-ordinary Networking are import for creating a product that works in all environments.)

Share and Enjoy

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

Accepted Answer

This sounds like you’re bumping into local network privacy. For lots of info about that feature, see TN3179 Understanding local network privacy.

Additionally, implementing UDP broadcasts correctly is a challenge, and bugs in your code tend to manifest in weird ways. I recommend you read through my Extra-ordinary Networking post, and specifically the Broadcasts and Multicasts, Hints and Tips post that it links to. (To be clear, I’m almost certain that your problem in local network privacy, but the techniques discussed in Extra-ordinary Networking are import for creating a product that works in all environments.)

Share and Enjoy

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

It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.

since the problem is occurring only on intel-based Macs

That’s the bit I don’t understand here. Local network privacy enforcement shouldn’t vary by architecture.

Are you using Xcode to build your app?

Is this UDP work done from your main app? Or from some sort of helper process?

Oh, and just because I can’t resist…

We are a hardware manufacturer.

By far the simplest solution here is to implement Bonjour in your accessory. That’ll get you out of the UDP broadcast business entirely (-:

Share and Enjoy

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

[1] Bonjour is an Apple term for three industry-standard protocols:

That’s the bit I don’t understand here. Local network privacy enforcement shouldn’t vary by architecture.

That's exactly something we can't explain either... but we've never observed it on any ARM Mac.

Are you using Xcode to build your app?

Yes, but we use Xcode from the command line via CMake.

Is this UDP work done from your main app?

Yes, no additional processes involved

Oh, and just because I can’t resist…

:D We are hardware manufacturer with a software department ;-)

By far the simplest solution here is to implement Bonjour in your accessory.

You're right – it's just that this solution was implemented many years ago and has been working perfectly until quite recently...

We are hardware manufacturer with a software department ;-)

You could say the same about my company (-:

So, lemme give you some concrete advice for how to approach this.

First set up a VM to test this on. That way you can restore from a fresh snapshot between tests. This is useful because, as mentioned in TN3179, there isn’t a good way to reset the local network privacy state on the Mac )-:

Second, create a small test app that sends and receives broadcasts. I have code snippets for this in Extra-ordinary Networking > Broadcasts and Multicasts, Hints and Tips. Test this in your VM. This should work. If it doesn’t, lemme know because that’s something I’d be happy to dig in to.

Once you have the test app working, you have known working and failing cases, and you can compare the two. And as you tweak your code, re-test on your VM to confirm your fixes.

Share and Enjoy

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

Thank you for the advice!

Since we are only observing this issue on intel based Macs so far the priority is not that high at the moment. So I suppose you will not hear from me soon.

But I will definitely post updates here when we figure out what exactly is causing the issue :-)

UDP Broadcast Discovery Fails on macOS 15 When Launched via Finder (Regression from Ventura)
 
 
Q