title: iOS: Property Values in Singleton
body: <p>My singleton setup:</p>
  
  <pre><code>//UserProfile.h
  @property (nonatomic, retain) NSString * firstName;
  @property (nonatomic, retain) NSString * lastName;
  +(UserProfile *)sharedInstance;
  
  
  //UserProfile.m
  +(UserProfile *)sharedInstance
  {
      static UserProfile *instance = nil;
      static dispatch_once_t oncePredicate;
      dispatch_once(&amp;oncePredicate, ^{
          if (instance == nil){
              instance = [[UserProfile alloc]init];
          }
      });
      return instance;
  }
  </code></pre>
  
  <p>Calling Singleton:</p>
  
  <pre><code>UserProfile *profileSharedInstance = [Profile sharedInstance];
  profileSharedInstance = [responseObject firstObject];
  NSLog (@"[UserProfile sharedInstance].lastName %@", [UserProfile sharedInstance].lastName);
  NSLog (@"profileSharedInstance.lastName %@", profileSharedInstance.lastName);
  </code></pre>
  
  <p>Log:</p>
  
  <pre><code>2014-03-31 05:47:50.557 App[80656:60b] [UserProfile sharedInstance].lastName (null)
  2014-03-31 05:47:50.557 App[80656:60b] profileSharedInstance.lastName Smith
  </code></pre>
  
  <p>Question:  Why is <code>[UserProfile sharedInstance].lastName</code> null?  Shouldn't it also it be "<code>Smith</code>"?</p>