I am making an IOS application in Swift with SpriteKit. I want to save the highest score using Core Data. I already have some experience with Core Data, but only in Master/Detail applications. I just went along and made the core data boilerplate code, XcDataModel and its NSManagedObject subclass, and put in code to save and retrieve the score in the GameScene.swift file. However, on this line:
let newItem = NSEntityDescription.insertNewObjectForEntityForName("PlayerData", inManagedObjectContext: context) as! PlayerData
it says:
CoreData: warning: Unable to load class named 'PlayerData' for entity
'PlayerData'. Class not found, using default NSManagedObject instead.
Could not cast value of type 'NSManagedObject_PlayerData_' (0x7f91e8d1b340)
to 'Game_Name.PlayerData' (0x10cacd930)
What did I do wrong? (yes, I have looked at CoreData: warning: Unable to load class named, tried all the fixes, and it still doesnt work)