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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:27:30+00:00 2026-05-28T05:27:30+00:00

I am new to iOS 5 programming so I’m sure that these are basic

  • 0

I am new to iOS 5 programming so I’m sure that these are basic questions for the experienced folks.

  1. I have a log in form that creates a unique session string. How can I maintain string in a way that it will be usable on all view controllers throughout the application just for that session?
  2. How can I store a series of strings (maybe 1 or 2 of them) so that they will be available to the application on subsequent application loads? In other words, how can I maintain a default string that can be used throughout the lifetime of the application on any given device?
  • 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-28T05:27:30+00:00Added an answer on May 28, 2026 at 5:27 am

    First, this can be stored on the Application Delegate (which is accessible like below from anywhere within your application:

    YourAppDelegate.h

    - (NSString *)uniqueSessionString;
    

    View Controller:

    NSString *uniqueString = [(YourAppDelegate *)[[UIApplication sharedApplication] delegate] uniqueSessionString];
    

    Second, to save this information look at NSUserDefaults. This information will persist even after the application closes. Here is a tutorial on using it here:

    http://mobile.tutsplus.com/tutorials/iphone/nsuserdefaults_iphone-sdk/

    If you need to maintain this string for all of a user’s devices, then you need to look at the NSUbiquitousKeyValueStore (part of iCloud). You also can use both of these methods together. See this SO question:

    How to use NSUbiquitousKeyValueStore and NSUserDefaults together

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

Sidebar

Related Questions

I'm fairly new to iOS programming, but have a basic understanding of it. I
We have a lot of staff that are relatively new to iOS programming and
new to IOS OpenGL programming. I have worked through a few tutorials that talk
I'm sure I'm dense from being new to iOS programming, but, I am having
I'm very new to IOS programming and i have doubt with NSThread. My problem
I'm new to iOS programming and am not sure what is wrong with this
I'm pretty new to iOS programming so sorry for any doh questions ;) I
I am very new to IOS programming. I have a task to find if
Just getting started with Obj-C and iOS programming. I have some code that loads
I am new to iOS programming - I have written an iOS app for

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.