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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:06:52+00:00 2026-06-14T21:06:52+00:00

My view controllers have a lot of bools, strings and ints that they save

  • 0

My view controllers have a lot of bools, strings and ints that they save with NSCoding, and then a couple of classes save more of the same kind of information. I tie it all together by putting the view controllers in an NSMutableDictionary and saving it with NSKeyedArchive.

NSMutableDictionary *rootObject;
rootObject = [NSMutableDictionary dictionary];
[rootObject setValue:self.controllers forKey:@"controllers"];
[NSKeyedArchiver archiveRootObject:rootObject toFile:path];

Using NSKeyedUnarchiver to set the view controllers brings back all of their NSCoded data and it works well.

I’m looking at implementing iCloud and am confused about the best way to go about it. If I store the NSMutableDictionary in a UIDocument class specifically made for saving and then load it up, will it carry the NSCoded values over?

  • 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-14T21:06:53+00:00Added an answer on June 14, 2026 at 9:06 pm

    Archiving simply means turning something into an NSData object. An NSData object is an NSData object. It will not mysteriously lose its integrity because it was stored in the cloud. If it worked when unarchived from wherever you have been keeping it (e.g. user defaults, a file on disk, etc.), it will work when you unarchive it from the cloud.

    You might not need the overhead of UIDocument. Keep in mind that iCloud effectively lets you keep the equivalent of NSUserDefaults-type data in the cloud (“key-value storage”) – and it doesn’t count against the user’s 5MB limit.

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

Sidebar

Related Questions

I am implementing view controllers that shall have different behaviour. They have a common
Situation: In have lot of view controllers in my app and they are presented
I have two view controllers that allow changes to the Address Book. The first
I have an app with a custom UITabBarController that contains five view controllers. Within
I have a lot of modal view controllers for my game. And so I
In one of my view controllers, i have a lot of different formats for
For a lot of my view controllers, I do not have an index action.
I have an app made up of a lot of view controllers... in the
Let's say we have an app which has a lot of view controllers and
I have two view controllers. The CardWallet View Controller is my table view. Then

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.