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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:17:00+00:00 2026-05-16T03:17:00+00:00

Does NSMutableArray support recursive serialization? E.g. will a NSMutableArray of NSMutableArray’s serialize the entirety

  • 0

Does NSMutableArray support recursive serialization? E.g. will a NSMutableArray of NSMutableArray’s serialize the entirety of the heirarchy out when calling writeToFile?

Example:

NSMutableArray *topArray = [[NSMutableArray alloc] init];
NSMutableArray *bottomArray = [[NSMutableArray alloc] init];

NSString *foo = @"foo";
NSString *bar = @"bar";
NSString *bar2 = @"bar2";

[topArray addObject:foo];
[topArray addObject:bottomArray];

[bottomArray addObject:bar];
[bottomArray addObject:bar2];

[topArray writeToFile:validFilePath atomically:YES];

I am asking as I have 3 string values and an NSMutableArray of NSData objects that I want to stuff into a parent NSMutableArray and serialize out to a file and then reconstitute at a later time. I would like to do this without writing my own NSCoder implementation if possible, take the easy way out.

Thanks.

  • 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-16T03:17:01+00:00Added an answer on May 16, 2026 at 3:17 am

    From experience I can say that any objects that I’ve added to an array are indeed recursively added to the file that is written out.

    Although its such an easy thing to test you might as well run that code you’ve written to test it yourself!

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

Sidebar

Related Questions

Is there a way to re set a sender tag like NSMutableArray does when
Does anyone out there know how to integrate ContentFlow ( http://www.jacksasylum.eu/ContentFlow ) and Lightbox2
If I instantiate an NSArray passing it an NSMutableArray, does it become a NSArray
Example: I add some NSString objects to an NSMutableArray: @Foo, @Bar, @FooBar . Now
Curious, how does an NSMutableArray mutate into a type of UIButtonContent? I'm currently working
How does one store a NSMutableArray of NSObjects to NSUserDefaults successfully? I tried a
Why does this leak? The arrayOfPerformances is a NSMutableArray , (nonatomic, retain) property that
I have a NSMutableArray that has custom objects in it. Each object does have
I am trying to copy NSMutableArray to another but it does not show me
Is it acceptable to have a NSMutableArray within an NSDictionary? Or does the NSDictionary

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.