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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:08:32+00:00 2026-05-21T02:08:32+00:00

I let the user make changes to their settings in the settings area of

  • 0

I let the user make changes to their settings in the settings area of the iphone. During the next network sync i’d like to send the user changes to the server. But only if the changes are made.

But how do I know when the user has made a change within the settings area?

If I can, I’d like to avoid an option of always sending the information regardless if changed or not or getting the info from the server first and updating if different from the user defaults.

Is there a nice and elegant way of resolving this problem?
Thank you for your help!

A week later and no answers…
Is this question too hard or it doesn’t make any sense at all?

  • 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-05-21T02:08:32+00:00Added an answer on May 21, 2026 at 2:08 am

    Ah silly me! Here we go with an elegant way. Search for AppPrefs in the Apple Documentation within XCode and it’ll show an example app which does exactly what you want to do. Just compile and run! It makes use of the NSUserDefaultsDidChangeNotification.

    This is the code being used to register an observer:

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(defaultsChanged:)
                                                 name:NSUserDefaultsDidChangeNotification
                                               object:nil];
    

    Old answer:

    It doesn’t look like as if you could get a modification date out of the NSUserDefaults. So far I only can think of this way:

    NSUserDefaults *previousDefaults = [someInstance previousUserDefaults];
    NSUserDefaults *currentDefaults = [NSUserDefaults standardUserDefaults];
    
    if([previousDefaults isEqualToDictionary:currentDefaults]) 
    {
        [someOtherInstance sendModifiedUserDefaultsToServerWithDefaults:currentDefaults];
        [yetAnotherInstance saveModified]
    }
    

    You have to save the user defaults yourself as dictionary to disk when the app is launched the first time: your default values. Then, everytime the app is opened you compare those two dictionaries. If they

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

Sidebar

Related Questions

I let user enter some code in my Flex3 (Flash 10) app and I
I want to let the user draw on an image in a browser. In
My application has a need to let the user choose a date from a
I'm using a SaveFileDialog to let a user pick a directory and filename on
Spy++ is a tool for windows that let the user spy on windows attributes,
Let's say we're tracking the end-user IP for a web service: ip = Request.ServerVariables(HTTP_X_FORWARDED_FOR)
Let me state first: I know that any user that wants to run a
Let's say you have a domain entity User and you want to support the
Let's say that I have a site where once the user selects a few
Let's say I have a page called display.php and the user is viewing display.php?page=3

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.