'App' is ambiguous for type lookup in this context

I get these errors every time: 'App' is ambiguous for type lookup in this context

And: Cannot convert value of type 'HomeList.Type' to expected argument type 'ObservedResults'

This is the code:


import UserNotifications

import RealmSwift



@main

struct KamelApp: App {


    @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

   // @StateObject private var itemId = ObjectId()

    let migrator = Migrator()

    var body: some Scene {

        WindowGroup {


            let _ = UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")

            let _ = print(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.path)

     
            ContentView(homeLists: HomeList, itemId: ObjectId())

        }

    }

}

The second error comes from Contentview

  • You're writing a SwiftUI app, it seems, so you'll need to import SwiftUI.

  • You seem to be passing a type name (HomeList) as the first parameter to your ContentView, when it presumably needs a value of type HomeList, or possibly an array of such values.

'App' is ambiguous for type lookup in this context
 
 
Q