wangrui460
 my sceneDelegate added environment this error shown when sheet a view, if you gesture to close but not close,error will show~
#24 · closed · 3 comments
 my sceneDelegate added environment this error shown when sheet a view, if you gesture to close but not close,error will show~
Thanks for creating an issue!
[The solution is here](https://stackoverflow.com/questions/58743004/swiftui-environmentobject-error-may-be-missing-as-an-ancestor-of-this-view)
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](https://github.com/nickffox/KeyboardObserving#1-add-a-keyboard-to-your-environment).