I have created 2 core data entities and then created NSManagedObject Subclasses for them from the editor menu.
However when I run my app I get errors on every line of all the files for some reason.
Here is an example, these errors are the same for both entities created files.
File Code was auto generated so i can apste it here but not sure of its use
import Foundation
import CoreData
extension UserExercise {
@nonobjc public class func fetchRequest() -> NSFetchRequest<UserExercise> {
return NSFetchRequest<UserExercise>(entityName: "UserExercise");
}
@NSManaged public var id: Int16
@NSManaged public var name: String?
@NSManaged public var reps: Int16
@NSManaged public var sets: Int16
@NSManaged public var weight: Int16
@NSManaged public var relationship: NSSet?
}
// MARK: Generated accessors for relationship
extension UserExercise {
@objc(addRelationshipObject:)
@NSManaged public func addToRelationship(_ value: UserRoutine)
@objc(removeRelationshipObject:)
@NSManaged public func removeFromRelationship(_ value: UserRoutine)
@objc(addRelationship:)
@NSManaged public func addToRelationship(_ values: NSSet)
@objc(removeRelationship:)
@NSManaged public func removeFromRelationship(_ values: NSSet)
}
Errors are:
Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
Invalid redeclaration of 'UserRoutine' 'UserExercise' is ambiguous for type lookup in this context @NSManaged only allowed on an instance property or method
Theres too many to list its basically these repeated over and over