I created a minimal SwiftUI macOS app that consistently reproduces the same ViewBridge warning. The issue occurs only when using a SecureField
view in a Settings
scene, not in a standard WindowGroup
scene.
- Launch the application
- Open the Settings window (⌘,)
- Close the Settings window
- Open the Settings window again (⌘,)
Upon reopening the Settings window, the following warning appears in the console:
ViewBridge to RemoteViewService Terminated: Error Domain=com.apple.ViewBridge Code=18 "(null)" UserInfo={com.apple.ViewBridge.error.hint=this process disconnected remote view controller -- benign unless unexpected, com.apple.ViewBridge.error.description=NSViewBridgeErrorCanceled}
- The warning only occurs when a
SecureField
view is present in a Settings
scene - The same
SecureField
view in a WindowGroup
scene does not trigger the warning when repeatedly opening and closing the main window (⌘N)
- OS: macOS 15.3.2
- SDK: macOS 15.4
- IDE: Xcode 16.3
- Compiler: Swift 6
import SwiftUI
struct TestView: View {
var body: some View {
SecureField("Test", text: .constant(""))
}
}
@main
struct TestApp: App {
var body: some Scene {
// Creating, closing, and repeatedly creating a new window (⌘N)
// WILL NOT cause the warning
WindowGroup {
TestView()
}
// Creating, closing, and reopening Settings (⌘,)
// WILL cause the ViewBridge warning on second opening
Settings {
TestView()
}
}
}