Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6965635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:05:14+00:00 2026-05-27T16:05:14+00:00

I just got started with core data. I have bunch of entities with about

  • 0

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?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:05:14+00:00Added an answer on May 27, 2026 at 4:05 pm

    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

    <project directory>/<project name>/project_name.xcdatamodeld/project_name.xcdatamodel
    

    The default looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <model name="Test1.xcdatamodel" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic">
        <entity name="Event">
            <attribute name="timeStamp" optional="YES" attributeType="Date"/>
        </entity>
        <elements>
            <element name="Event" positionX="261" positionY="189" width="128" height="60"/>
        </elements>
    </model>
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just got started with Sentry , which is lovely. I've got about 10
I just started learning python and django and I have a question. I got
I just started to learn about mod rewrite process. Now, I got some problems
I have a java application for an ATC. I just got started with the
I just got started with php. I have a form in a web page
I just got started with nodeJS, and don't know much about it. Also I
Really weird problem. I have a tableView that pulls data out of a Core
I have just started trying to learn Git and I have got a little
I have just started to learn Ruby and got a good take on the
I've just started using VS2010. I've got a largish solution that migrated successfully from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.