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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:12:59+00:00 2026-06-02T06:12:59+00:00

NSUserDefaults is persistent right? If we close application it’s still there. So it’s IO.

  • 0

NSUserDefaults is persistent right? If we close application it’s still there. So it’s IO.

Does that mean everytime we do

– setObject:forKey: we do IO?

Does iPhone will read and write to disk everytime we do

[[NSUserDefaults standardUserDefaults] setObject:trimmedSearchLocation forKey:SEARCHNEAR];

or that sort of thing

  • 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-02T06:13:00+00:00Added an answer on June 2, 2026 at 6:13 am

    From the docs:

    At runtime, you use an NSUserDefaults object to read the defaults that your application uses from a user’s defaults database. NSUserDefaults caches the information to avoid having to open the user’s defaults database each time you need a default value. The synchronize method, which is automatically invoked at periodic intervals, keeps the in-memory cache in sync with a user’s defaults database.

    so only if synchronize invokes you have IO on your disk!

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

Sidebar

Related Questions

Possible Duplicate: iPhone inputting NSUserDefaults into a UITextField Is there a way to remember
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:@xxxxxxxx forKey:@name]; [defaults synchronize]; I need to know
My [NSUserDefaults standardUserDefaults] are not being saved. Everytime I close the app and start
If I'm using NSUserDefaults to store settings for my application, is there any way
What are my different options of persisting data entered in an iPhone application? NSUserDefaults:
I use these methods [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@ar] forKey:@AppleLanguages]; [[NSUserDefaults standardUserDefaults] synchronize]; to force
[[NSUserDefaults standardUserDefaults] setObject:myArray forKey:@myArray]; I'm trying to figure out how to save and load
[[NSUserDefaults standardUserDefaults] setObject:myArray forKey:@myArray]; If I make an array of custom objects conform to
I'm subclassing NSUserDefaults in my application. A side effect of this is I can't
I'm confused about NSUserDefaults on the iPhone. I come from a C / asm

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.