I just got started with core data. I have bunch of entities with about 40-50 attributes. Given that I have an array of strings which represent the name of the attributes (the type of these attributes are all string), is there a way I can programmatically set the attributes from the array? or do I have to manually copy paste these attributes into the Xcode IDE?
Share
While fiddling with the sqlite data store will not help you, there is a file that describes the data model inside your project folder. This file is in xml format so you could iterate through your array and generate the necessary entries into this file. You could then overwrite the default file and reopen your project in Xcode. If you are lucky all your entities and attributes will be there.
To get you started let me point you to the file. If you just start a new project with the default core data model included, it should be located at
The default looks like this:
Hope this helps.