I've had many many issues with Xcode in general, but this just started happening to all my projects.
I've created a new entity, my core data model has the correct 'Target Membership' selected.
But once I try selecting 'Create NSManagedObject Subclass' of my new entity, the wizard properly takes me through all the necessary steps and I get the following generated Swift code:
import Foundation
import CoreData
class CoreDatGeneric: NSManagedObject {
// Insert code here to add functionality to your managed object subclass
}
import Foundation
import CoreData
class CoreDatGeneric: NSManagedObject {
// Insert code here to add functionality to your managed object subclass
}
However... I can't use this new Swift class named CoreDatGeneric ANYWHERE in my code...
For example,
let data = DoreDatGeneric()
results in a compiler error stating Use of unresolved identifier 'CoreDatGeneric'
I have no idea why this is happening all of a sudden, all my other older Core Data entities work just fine, but I'm stuck at a point of not being able to use core data anymore on any of my projects.
I'm very worried about upgrading to Xcode 8, because of the negative reviews the latest Xcode had received. I'm using Xcode 7 right now.
CoreDatGeneric.swiftbelongs to the app target in Xcode? Also are you sure you're spelling the class name right? You misspelled it in your question.... - Tom Harrington