Simulator: iPhone 16 pro (iOS 26
)
Minimum Deployments: iOS 16.0+
, not iOS 17.
Here is the demo:
import SwiftUI
import NetworkExtension
struct ContentView: View {
private var monitor = NWPathMonitor()
var body: some View {
VStack {
Text("Hello, world!")
}
.task {
let _ = URLSession.shared
}
}
}
I was able to reproduce this as follows:
-
Using Xcode 26.0 beta on macOS 15.5, I created a new project from the iOS > App template.
-
I replaced
ContentView.swift
with the code you posted. -
I set the app’s deployment target to iOS 16.
-
I ran the app on the iPhone 16 Pro / iOS 26 simulator.
I suspect that you’re hitting the issue discussed on this thread.
As suggested on that thread, I was able to work around this by adding this code to my App
struct:
struct Test789304App: App {
init() {
_ = nw_tls_create_options()
}
…
}
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"