core-data Creating an Core Data Model Adding Attributes to Entity


Under the attributes section you add the attributes to your model. This button is a plus located at the bottom of the section. You can add any attributes that are relevant to your app. You have several options of types to choose from ranging from Booleans to Dates and more. The Inspector panel also has several options.


This is the Inspector Panel which allows you to add properties to the Attribute for example if you were adding an email you could provide a regex string ".+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2}[A-Za-z]*" to prevent postal addresses from being added to your email Attribute. Validation could allow for a min and max character for a phone number.

Inspector Panel