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

  • SEARCH
  • Home
  • 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 7829181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:39:20+00:00 2026-06-02T10:39:20+00:00

I have an NSArray called namesArray . I need to store all the names

  • 0

I have an NSArray called namesArray.

I need to store all the names existing in namesArray using coredata.

How do i achieve this ?

Does we need to create any database like 'names.sqlite' using sqlite manager?

  • 1 1 Answer
  • 0 Views
  • 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-06-02T10:39:27+00:00Added an answer on June 2, 2026 at 10:39 am

    No you don’t need to create a names.sqlite using manager. You should go through some of the tutorial found on the net for example: Here or Here.

    You basically need to save in the datamodel in valueForKey format.

       //Coredata saving
     self.theAppDel=[[UIApplication sharedApplication] delegate];
     NSManagedObjectContext*context=[self.theAppDel managedObjectContext];
     NSManagedObject*object=[NSEntityDescription insertNewObjectForEntityForName:@"Contacts" inManagedObjectContext:context];
     NSError*error=nil;
    
     [object setValue:[namesArray objectAtIndex:0] forKey:@"name"]; //for saving first name
    

    1. Creating an instance of your appdelegate .

    2. Access your Managed Object Context and Managed Object

    3. Assuming you created a entity description with name contacts. With the count of number of items in your array, add each object for a column named name (which i’m assuming you would have created).

    This is short example, but you should go through the tutorials and read apple’s documentation.

    EDIT: As Ondra mentioned my earlier solution would have added only the last element. Use the following for adding: Adding NSMutableArray in CoreData Thanks Ondra Peterka

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

Sidebar

Related Questions

I have some NSDictionary objects stored in an NSArray called telephoneArray . I fetch
I have an NSArray full of NSDictionary object. This structure is built from a
I have an NSArray which contains Person objects. This person object contains the following;
I have a NSArray of objects. Those objects have an int attribute called distance.
I have the following method called when my UITableView reloads: -(NSArray *)theAccounts { if
So I have this custom object i made called 'Box', it's throwing the error
I have NSArray that contains NSDictionaries. I need to convert it to CFMutableArray that
I have a property called data of type NSArray in InventoryFilteredTVC and here's a
I have an NSArray of objects , which has a particular property called name
I have a Thread called 10 times: [NSThread detachNewThreadSelector:@selector(workInBackground:) toTarget:self withObject:sendArray]; This is the

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.