Align Apple platform floors and fix watchOS compilation - #3
Merged
Merged
Conversation
The package declares .macOS(.v15) but uses no macOS-15-only API: there are no @available guards, no import Synchronization, and no Mutex/Atomic usage anywhere in Sources. The newest API in use is NWBrowser, available since macOS 10.15. Lowering the floor to .v14 lets consumers that must support macOS 14 adopt the package without forcing their deployment target up.
NetService is API_UNAVAILABLE(watchos), so the declared watchOS platform support has never actually compiled — and the API is deprecated on every other platform. The TXT wire format (RFC 6763) is just length-prefixed "key=value" entries, so encode it directly. Keys are sorted for deterministic output and entries are truncated at 255 bytes, matching the Linux responder's TXT encoding in MDNSMessage.
With macOS lowered to 14 (PR #1), align the remaining Apple platforms on the same SDK generation: iOS 17, tvOS 17, watchOS 10, visionOS 1. The newest APIs in use are Duration and Task.sleep(for:), whose floors are the macOS 13 generation, so all of these clear comfortably. Verified by cross-compiling each platform against its SDK. watchOS additionally needed the NetService removal in the previous commit to compile at any version.
CI previously built only macOS and Linux, so the declared iOS, tvOS, watchOS, and visionOS floors were never validated — which is how the watchOS NetService breakage went unnoticed. Build-only cross-compiles are enough to catch unavailable APIs and availability-floor violations.
dmonagle
force-pushed
the
apple-platform-floors
branch
from
August 9, 2026 05:45
ed92ea8 to
3b632e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #1 (the contributor's commit is merged in, so merging this PR will automatically mark #1 as merged with authorship intact).
Changes
Duration,Task.sleep(for:)) have macOS 13-generation floors, so all of these clear comfortably.NetServiceisAPI_UNAVAILABLE(watchos), so the declared watchOS support has never compiled. ReplacedNetService.data(fromTXTRecord:)with a hand-rolled RFC 6763 TXT encoder (length-prefixedkey=valueentries, sorted keys, 255-byte truncation matching the Linux responder), with unit tests.NetServiceis deprecated on all other platforms too, so this is also a cleanup.Verification
swift teston macOS: 33/33 pass