Chap 29 [Domain] not in scope

I imported SwiftUI like the book demo does when I type in

func fetchDomains() async throws -> [Domain] {
  [] // Fill in the implementation later
}

I get “Cannot find type ‘Domain’ in scope” with the D in the [Domain] underlined. I then tried importing Foundation, UIKit and Combine in hope it might be in one of those. Then I tried quitting XCode because in the past (in this book in fact) if everything should be right but isn’t sometimes that helps.

This topic was automatically closed after 166 days. New replies are no longer allowed.