title: Reverse Question Mark in Boolean Value IOS NSUserdefaults
body: <p>I have an app with story board and navigation controller, I want to pop up a agreement view if user launches the app first time, </p>
  
  <p>in Appdelegate.m</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      //app launched first time
      NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
      [prefs setBool:YES forKey:@"firstTime"];
      BOOL firstTime = [prefs boolForKey:@"firstTime"];
      NSLog(@"firstTime %c",firstTime);
  
       //check if user has agreed agreement or not
      if ( firstTime==YES) {
  
          //replace and push rootview manually
          UIStoryboard *storyboard = [UIApplication sharedApplication].delegate.window.rootViewController.storyboard;
  
          UIViewController *loginController = [storyboard instantiateViewControllerWithIdentifier:@"AgreementViewController"];
  
          [self.window.rootViewController presentModalViewController:loginController animated:YES];
  
      return NO;
      }else
  
       return YES;
  }
  </code></pre>
  
  <p>In <code>Nslog</code> for first time I get a <code>reverse question mark sign</code>, I guess it is neither set to yes or no</p>
  
  <p>So how can I set a Boolean value,save it in ios device and call it everytime app launches?</p>