Skip to content

Align Apple platform floors and fix watchOS compilation - #3

Merged
dmonagle merged 5 commits into
mainfrom
apple-platform-floors
Aug 9, 2026
Merged

dmonagle merged 5 commits into
mainfrom
apple-platform-floors

Conversation

@dmonagle

@dmonagle dmonagle commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #1 (the contributor's commit is merged in, so merging this PR will automatically mark #1 as merged with authorship intact).

Changes

  • Lower iOS/tvOS/watchOS/visionOS floors to the macOS 14 SDK generation: iOS 17, tvOS 17, watchOS 10, visionOS 1. The newest APIs in use (Duration, Task.sleep(for:)) have macOS 13-generation floors, so all of these clear comfortably.
  • Fix watchOS compilation: NetService is API_UNAVAILABLE(watchos), so the declared watchOS support has never compiled. Replaced NetService.data(fromTXTRecord:) with a hand-rolled RFC 6763 TXT encoder (length-prefixed key=value entries, sorted keys, 255-byte truncation matching the Linux responder), with unit tests. NetService is deprecated on all other platforms too, so this is also a cleanup.
  • Add cross-compile CI jobs for iOS/tvOS/watchOS/visionOS so declared platform floors are validated going forward — this is the gap that let the watchOS breakage go unnoticed (CI previously built only macOS and Linux).

Verification

  • swift test on macOS: 33/33 pass
  • Cross-compiled all four platforms at the new floors against their SDKs: all build

mikeburgh and others added 5 commits June 9, 2026 21:00
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
dmonagle force-pushed the apple-platform-floors branch from ed92ea8 to 3b632e8 Compare August 9, 2026 05:45
@dmonagle
dmonagle merged commit 18c6d85 into main Aug 9, 2026
6 checks passed
@dmonagle
dmonagle deleted the apple-platform-floors branch August 9, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants