DNSServiceNATPortMappingCreate was quietly killed in macOS Monterey

from blog The Desolation of Blog, | ↗ original
According to Apple's API documentation, the function DNSServiceNATPortMappingCreate "Requests a port mapping in the NAT gateway, which maps a port on the local machine to an external port on the NAT." This function has been available to developers for more than five years, and it continues to work fine on macOS 11.6.1 Big Sur. It's not marked as deprecated in the documentation or in the framework header files from the macOS 12 SDK. However, the function simply doesn't work on macOS 12 Monterey and never has. I filed a bug in Apple's Feedback Assistant on June 8, the day after we got the first developer preview of Monterey at this year's Worldwide Developers Conference. I know of several other developers who also filed the same bug. Yet almost 5 months later, with Monterey having been released already to the general public, DNSServiceNATPortMappingCreate still doesn't work. I've heard that the bug hasn't been fixed in the macOS 12.1 beta either. Any software that relies on DNSServiceNATPortMappingCreate is out of luck on Monterey.