Working with coredate I used the option codegen: category/extension to be able to create a file where I can put in the re-usable code for finding, updating or deleting database entries. I started the coredata entity first with the codegen option Class Definition and changed it to category/extension in a later stage.
Now I run against a compile error: 'Property cannot be declared public because its type uses an internal type'
The file name is a generated swift file called: Gameresults+Coredataproperties.swift
I got the error on the player: TournamentPlayer?
player and round are both relations to another entity.
import Foundation
import CoreData
extension GameResults {
@nonobjc public class func fetchRequest() -> NSFetchRequest<GameResults> {
return NSFetchRequest<GameResults>(entityName: "GameResults")
}
@NSManaged public var earnedRankingPoints: Int16
@NSManaged public var framePoints: Int16
@NSManaged public var highestBreak: Int16
@NSManaged public var isWon: Bool
@NSManaged public var player: TournamentPlayer?
@NSManaged public var round: Rounds?
}
I could not believe that the error did come out of swift so I tried the clean build folder option, saving file, exiting XCode, etc. Nothing worked.
Any tips where to look at how to fix this?