The iOS 26 simulator crashed due to NWPathMonitor

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
        }
    }
}
Answered by DTS Engineer in 845166022

I was able to reproduce this as follows:

  1. Using Xcode 26.0 beta on macOS 15.5, I created a new project from the iOS > App template.

  2. I replaced ContentView.swift with the code you posted.

  3. I set the app’s deployment target to iOS 16.

  4. 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"

Accepted Answer

I was able to reproduce this as follows:

  1. Using Xcode 26.0 beta on macOS 15.5, I created a new project from the iOS > App template.

  2. I replaced ContentView.swift with the code you posted.

  3. I set the app’s deployment target to iOS 16.

  4. 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"

The iOS 26 simulator crashed due to NWPathMonitor
 
 
Q