Core data build issue

I have created several entities in the data modeler and created the sublasses (tools version Automatic Xcode 8.0) using Class Definition for Codegen.

The subclass is created correctly.

import Foundation
import CoreData
import UIKit
extension CLCText {
    @nonobjc class func fetchRequest() -> NSFetchRequest<CLCText> {
        return NSFetchRequest<CLCText>(entityName: "CLCText");
    }
    @NSManaged var font: UIFont
    @NSManaged var digitMarker: CLCDigitMarker?
}

Compiling the code, I get similar error messages for all of the entities:


<unknown>:0: error: no such file or directory: '/Users/***/Library/Developer/Xcode/DerivedData/Clocks-bxgduwqteypfhkabgkvbkpgkqhcp/Build/Intermediates/Clocks.build/Debug-iphonesimulator/***.build/DerivedSources/CoreDataGenerated/CLClockModel/.CLCText+CoreDataClass.swift'

<unknown>:0: error: no such file or directory: '/Users/***/Library/Developer/Xcode/DerivedData/Clocks-bxgduwqteypfhkabgkvbkpgkqhcp/Build/Intermediates/Clocks.build/Debug-iphonesimulator/***.build/DerivedSources/CoreDataGenerated/CLClockModel/.CLCText+CoreDataProperties.swift'

Command /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1


As a matter of fact, the files are in the subfolder, but without the leading dot: file:///Users/***/Library/Developer/Xcode/DerivedData/Clocks-bxgduwqteypfhkabgkvbkpgkqhcp/Build/Intermediates/Clocks.build/Debug-iphonesimulator/***.build/DerivedSources/CoreDataGenerated/CLClockModel/CLCText+CoreDataClass.swift and …/CLCText+CoreDataProperties.swift.

Replies

Are you trying to file a bug against the beta or ask a question, or...?

I am also having this problem. I am not sure if its been reported as a bug though

I had this problem too. I checked the Configurations -> Default xcdatamodeld and saw that my Class was prepended with a ".". I then clicked the entity and remove the "module" setting. So it goes to global namespace. This removed the "." and seemed to fit everything

I also recommend and clean and rebuild.

The problem is in xcdatamodel where in 3rd tab for Entity Properties the class name has been mention in the Class sub list.


Remove that name, and in the Codegen drp down select manual/none


Then clean and build.


Hope this helps