I'm struggling to figure out how to build a Core Data model to support the class structure I've created in my app.
My app has users, and I allow those users to log into the app using multiple different authentication methods. Each authentication method requires slightly different credentials and cred types. I've chosen to solve this by creating an abstract
One way is to set up a Core Data entity hierarchy that parallels your class hierarchy. Create an abstract entity in Core Data called
AuthenticationSettings and create a series of sub-entities for each authentication type. As with your
User class property, create a relationship to
A simpler approach that sounds like it would meet your needs would be to make your various authentication classes conform to
NSCoding, and then just store them in a single "transformable" (not string) field on the user entity. Core Data would then convert the authentication object to/from