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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:06:31+00:00 2026-06-16T00:06:31+00:00

I am making a request for an array of perhaps 10-100 objects, all of

  • 0

I am making a request for an array of perhaps 10-100 objects, all of which are JSON objects that I parse into NSDictionary’s. I want to cache this and use this data across the entire application. Is NSCache useful for this or is it better to use NSUserDefaults or what is actually the most accepted way of persisting data across an entire app? CoreData? I’m a iOS newb and don’t have too much experience in this.

  • 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-16T00:06:32+00:00Added an answer on June 16, 2026 at 12:06 am

    What you are looking for is a way to access data across your app. This is typically the role a Model plays in MVC.

    CoreData and NSUserDefaults are ways to save data so it is not lost when your app closes or is quit. They can be parts of a Model, but do not help in having that data be accessible throughout your app.

    If you want an object that stores data and can be accessed anywhere in your code, you are probably looking for a Singleton.

    As this excellent Stack Overflow answer explains:

    Use a singleton class, I use them all the time for global data manager classes that need to be accessible from anywhere inside the application.

    The author provides some sample code you might find helpful.

    This would allow you to create a simple object accessible throughout your program that has your NSDictionaries. Because it is a singleton, other classes in your program can easily access it – meaning they can also easily access the NSDictionaries you’ve stored in it.

    If you do decide you want to save data, that singleton object would also be an ideal location to write any load and save code.

    Good luck!

    Other good resources are:

    • Wikipedia’s Entry on Singeltons
    • What Should My Objective C Singleton Look Like?
    • Singeltons and ARC/GCD
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an http request which ends up taking more than 8 mins.
I'm making a post request to the server and getting back the array of
I have a page that is making an XML POST-Request to an URL on
I'm making a cURL post request with the following script which posts to a
I'm making a request to a cfc file that queries a database. Do I
Im making a async request but when I try to parse it with this
Okay so here's what I'm doing. I'm making a request to a server to
I am making a comment / request form for my website and in order
I am making an ajax request to an external php file, then returning some
I am making a post request on an Arduino device with the Ethernet shield

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.