You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No ObservableObject of type Navigator found. A View.environmentObject(_:) for Navigator may be missing as an ancestor of this view.
----------------------------------------
MissingEnvironmentObjectError: Preview is missing environment object "Navigator"
[Sample] crashed due to missing environment of type: Navigator. To resolve this add `.environmentObject(Navigator(...))` to the appropriate preview.
Process: [Sample][65512]
Date/Time: 2021-09-29 01:02:26 +0000
Log File: <none>
Application Specific Information:
[
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/apple/Library/Developer/Xcode/DerivedData/[Sample]-dcfjwaohgmozctgpvtbixewazoqo/Build/Intermediates.noindex/Previews/[Sample]/Products/Debug-iphonesimulator DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot//System/Library/PrivateFrameworks/PreviewsInjection.framework/PreviewsInjection DYLD_FRAMEWORK_PATH=/Users/apple/Library/Developer/Xcode/DerivedData/[Sample]-dcfjwaohgmozctgpvtbixewazoqo/Build/Intermediates.noindex/Previews/[Sample]/Products/Debug-iphonesimulator
SwiftUI/EnvironmentObject.swift:70: Fatal error: No ObservableObject of type Navigator found. A View.environmentObject(_:) for Navigator may be missing as an ancestor of this view.
CoreSimulator 776.3 - Device: iPhone 12 Pro (48F2C8C7-D179-42EE-8709-82EB7E969381) - Runtime: iOS 15.0 (19A339) - DeviceType: iPhone 12 Pro
]
==================================
| MessageSendFailure: Message send failure for send previewInstances message to agent
|
| ==================================
|
| | RemoteHumanReadableError: Cannot send message on <UVAgentPreviewServiceServerConnection: 0x600001ee54a0>: connection has invalidated
| |
| | com.apple.dt.UITestingAgent (-1):
The text was updated successfully, but these errors were encountered:
All SwiftUIRouter Views (except for Router) depend on several environment objects and values. The Router View initiates all these objects and values. 😃
As seen, I successfully run with it on my actual device, but failed in preview.
Am I made something wrong?
MacOS BigSur 11.6 (20G165)
XCode Version 13.0 (13A233)
Swift 5.5
Just simple code
Diagnostics
The text was updated successfully, but these errors were encountered: