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

Blackbird.Database does not conform to ObservableObject #22

Open
r-token opened this issue Oct 10, 2023 · 1 comment
Open

Blackbird.Database does not conform to ObservableObject #22

r-token opened this issue Oct 10, 2023 · 1 comment

Comments

@r-token
Copy link

r-token commented Oct 10, 2023

When following the SwiftUI example from the README and initializing the database via @StateObject var database = try! Blackbird.Database.inMemoryDatabase(), I get an error message in Xcode stating the following:

Generic struct 'StateObject' requires that 'Blackbird.Database' conform to 'ObservableObject'

Any ideas? I assume I'm just missing something obvious here, but would love some insight! This is using Xcode 15, for what it's worth.

Really happy with how this is designed and would love to use it if I can get past the initialization hurdle. More than happy to provide whatever info you need, but hopefully I'm just doing something dumb.

@r-token
Copy link
Author

r-token commented Oct 10, 2023

Update: It looks like the extension Blackbird.Database: ObservableObject { } line from here didn't make it into the Swift Package Manager release.

Adding that extension myself resolved it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant