marcoarment / Blackbird

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blackbird.Database does not conform to `ObservableObject`

r-token opened this issue · comments

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.

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!