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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:50:18+00:00 2026-05-15T06:50:18+00:00

I have value in 1 string for particular key. but NSUserDefault class method doesn’t

  • 0

I have value in 1 string for particular key.
but NSUserDefault class method doesn’t work properly and it doesn’t set object of a string forkey .

in short setobject forkey method is not working of NSUserDefault class.
why is it so?

  • 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-15T06:50:18+00:00Added an answer on May 15, 2026 at 6:50 am

    First of all, NSUserDefault class works just fine. It is called millions of times every day and works exactly as expected. The next likely culprit is your code. If you post that, it will be much easier to determine what you’re doing wrong, and to make an appropriate suggestion.

    (Edit added after OP’s comment)

    I just added this code:

    //* TEST
    NSString *string01 = @"Hardwork";
    NSUserDefaults* defs111 = [NSUserDefaults standardUserDefaults];
    [defs111 setObject:string01 forKey:@"first_name_textfield"];
    NSString *test = [defs111 objectForKey:@"first_name_textfield"];
    NSLog(@"Test: %@", test);
    

    to my project and ran it and everything worked just fine.

    As I stated above: NSUserDefault works like a champ. There’s something you’re not telling us about your use-case. Something important. 😉

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

Sidebar

Ask A Question

Stats

  • Questions 535k
  • Answers 535k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer $("#flickrbox-fs-w").click(function(){ console.log(this)}); worked for me in firebug console. If you… May 17, 2026 at 1:01 am
  • Editorial Team
    Editorial Team added an answer Are you sure that MSBuild 4.0 is used? Launching MSBuild… May 17, 2026 at 1:01 am
  • Editorial Team
    Editorial Team added an answer The compiler-provided default may not do everything you need done.… May 17, 2026 at 1:01 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I currently have a class that uses the KeyValuePair with List to store a
I have a class that's currently inheriting from Dictionary and then adds a few
I want to have a collection of objects, which will be of a class
I have two classes. The base class is A. The inherited class is B.
I have found a proper solution to my problem but even after reading mysql
I have a class Foo with a field UpdateMe of type Confirmation as described
I have a dependent UIPicker that loads the values into its two components from
From http://fullthrottledevelopment.com/php-nonce-library#download , there is a PHP nonce library, but there are a few
I've looked through similar questions but I'm still a little perplexed about something that
I have a situation that is pretty simple, and I'd like to know the

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.