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 8120207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:04:13+00:00 2026-06-06T05:04:13+00:00

I have a mutable array that has about 100 objects in it and each

  • 0

I have a mutable array that has about 100 objects in it and each object has three properties.
I cannot save this to a plist?? I can save an array that just has objects without properites, but the individual property thing is giving me a problem.
Any suggestions?
Also, is saving to a plist the best way to do this?
thanks in advance.

  • 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-06T05:04:15+00:00Added an answer on June 6, 2026 at 5:04 am

    You can store NSDictionary inside NSDictionary, or maybe you mean a NSArray that holds NSDictionary?

    NSMutableArray *myArray = [[NSMutableArray alloc] init];
    
    NSMutableDictionary *myDict1 = [[NSMutableDictionary alloc] init];
    [myDict1 setValue:@"string 1" forKey:@"item_1"];
    [myDict1 setValue:@"string 2" forKey:@"item_2"];
    [myDict1 setValue:[NSNumber numberWithInt:10]   forKey:@"item_3"];     
    
    // add the array 3 times
    [myArray addObject:myDict1];
    [myArray addObject:myDict1];
    [myArray addObject:myDict1];
    NSLog(@"%@", myArray);
    
    // write to plist    
    [myArray writeToFile:@"/tmp/array_with_dict.plist" atomically:YES];
    
    // dict inside dict
    NSMutableDictionary *mainDict = [[NSMutableDictionary alloc] init];
    [mainDict setValue:myDict1 forKey:@"dict_1"];
    
    // write to plist
    [mainDict writeToFile:@"/tmp/dict_with_dict.plist" atomically:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mutable array that has been retained. This array contain dictionaries with
I have this method to save a mutable array named myWallet that contains instances
I have a mutable array that is retained and storing several objects. At some
I have an mutable array of say 20 objects. And it has values like
If I have an NSArray (or mutable array) with several dictionary objects (each dictionary
I have a question about the difference between volatile and mutable. I noticed that
My app has 3 kinds of objects: A, B and C. Each object is
I have a UITableView that was created from data coming from a mutable array.
I have an non-mutable array that only needs to have numbers. How would I
I have a mutable array which stores sprites but the problem is that 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.