KDT-860: Add new beta APIs for macOS 15.0+#7
Draft
kp-michele-emiliani wants to merge 6 commits intomasterfrom
Draft
KDT-860: Add new beta APIs for macOS 15.0+#7kp-michele-emiliani wants to merge 6 commits intomasterfrom
kp-michele-emiliani wants to merge 6 commits intomasterfrom
Conversation
This is needed because GHA runners on macos13 support up to Xcode 15, and we need v16 for the new APIs
Xcode suggested these changes. TBD if we are gonna keep them
No need to check for macos version, since NWEndpoint is available from macos 10.14+ https://developer.apple.com/documentation/network/nwendpoint
New macos 15.0+ APIs uses Network.NWEndpoint for both TCP remoteEndpoint (new name is remoteFlowEndpoint) and UDP localEndpoint (new name is localFlowEndpoint). The old APIs use a different type, which is NetworkExtension.NWEndpoint. Network.NWEndpoint is available also on older macos versions, so we can just use that type in our FlowTCP and FlowUDP classes, then for older versions convert from NetworkExtension.NWEndpoint to it
d984d5f to
7cdeb47
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.
PR to use the new APIs for macos 15.0+ versions.
Since old APIs still work on macos 15.0, I will revisit these change once 15.1 release is closer