Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #24

Open
wangrui460 opened this issue May 6, 2021 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@wangrui460
Copy link

image

my sceneDelegate added environment

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

@github-actions
Copy link

github-actions bot commented May 6, 2021

Thanks for creating an issue!

@wangrui460
Copy link
Author

The solution is here

@nickffox nickffox added the duplicate This issue or pull request already exists label May 7, 2021
Repository owner locked and limited conversation to collaborators May 7, 2021
@nickffox
Copy link
Owner

nickffox commented May 7, 2021

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.

Repository owner unlocked this conversation May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants