KeyboardObserving icon indicating copy to clipboard operation
KeyboardObserving copied to clipboard

Fatal error: No ObservableObject of type Keyboard found. A View.environmentObject(_:) for Keyboard may be missing as an ancestor of this view.: file SwiftUI, line 0

Open wangrui460 opened this issue 3 years ago • 3 comments

image

my sceneDelegate added environment

this error shown when sheet a view, if you gesture to close but not close,error will show~

wangrui460 avatar May 06 '21 08:05 wangrui460

Thanks for creating an issue!

github-actions[bot] avatar May 06 '21 08:05 github-actions[bot]

This looks like a duplicate of #21.

It sounds like there isn’t a Keyboard instance in the environment. Make sure you’ve added that in your SceneDelegate (or wherever you set up you’re environment).

Here’s the link to the documentation showing how to do this.

nickffox avatar May 07 '21 05:05 nickffox