Skip to content

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

Description

@wangrui460

image

my sceneDelegate added environment

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

Activity

  1. github-actions commented on May 6, 2021

    @github-actions

    Thanks for creating an issue!

  2. wangrui460 commented on May 6, 2021

    @wangrui460
    Author
  3. added
    duplicateThis issue or pull request already exists
    on May 7, 2021
  4. Repository owner locked and limited conversation to collaborators on May 7, 2021
  5. nickffox commented on May 7, 2021

    @nickffox
    Owner

    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.

  6. Repository owner unlocked this conversation on May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions