xcode 8.2 swift 3 Core data -- use unresolved identifier

Raj Aggrawal picture Raj Aggrawal · Jan 17, 2017 · Viewed 9.2k times · Source

I have created a core data project in xcode 8.2, After that I created an entity say "TestEntity" in .xcdatamodeld

I am creating entity object by using following code as per given in some tutorials for swift3. enter link description here

    let appDele = (UIApplication.shared.delegate) as! AppDelegate
    let cont = appDele.persistentContainer.viewContext

    let ent  = TestEntity(context:cont)

But I got an error "use of unresolved identifier 'TestEntity'."

how to resolve that error. enter image description here enter image description here

Answer

JP Aquino picture JP Aquino · Feb 5, 2017

Product->Buld for testing solved this issue for me(it solves most unresolved identifier bugs for some strange reason)