[quote='847299022, Peter_Si, /thread/789165?answerId=847299022#847299022, /profile/Peter_Si'] Can you help me understand the difference between a NetworkExtension.NWEndpoint and Network.NWEndpoint and where I would need to use one versus the other? [/quote] Sure. And that is, indeed, a gnarly edge case. NetworkExtension.NWEndpoint is an Objective-C class. It was introduced prior to the introduction of Network framework proper. Network framework is a Swift API [1] and, in Swift, it makes sense to represent endpoints as an enum, so Network.NWEndpoint is an enum. Quoting TN3151 Choosing the right networking API: Network Extension in-provider networking includes NWUDPSession. While there are some very limited circumstances where this is still useful, in most cases it’s better to use Network framework. For more details, see In-Provider Networking. So, what are those circumstances? In short: If your product supports system prior to the introduction of Network framework, that is, macOS 10.14. That’
Topic:
App & System Services
SubTopic:
Networking
Tags: