iosswiftcore-dataswift4

'Class' is ambiguous for type lookup in this context


I did a core-data model:

class Order: NSManagedObject {
    ... //code
}

but when I try to build I get an error:

'Order' is ambiguous for type lookup in this context


Solution

  • so I figured - the Entity 'Order' should be defined in the core data properties panel.

    1. open core data .xcdatamodeld file

    2. select the Entity 'Order'

    3. On the right select "Current Product Module" under module

    4. select "Category/Extension" under Codegen

    enter image description here