title: ios observer not working on device but working on simulator
body: <p>I am using an observer to track loggedin status of a user, the status is updated to  nsuserdefaults; below is the code</p>
  
  <pre><code> if(loggedInStatusDefault != true){
      defaults.addObserver(self, forKeyPath: loginDefaultsKeys.accessTokenKey, options: NSKeyValueObservingOptions.New, context: nil)
   }
  </code></pre>
  
  <p>whenever the value <code>loginDefaultsKeys.accessTokenKey</code> is updated, the <code>observeValueForKeyPath</code> function is called -</p>
  
  <pre><code>override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer&lt;Void&gt;) {
     DDLogVerbose("LoggedIn successfully")
     showHomeScreen()
  }
  </code></pre>
  
  <p>Inside observeValueForKeyPath, I am calling showHomeScreen() that is dependent on the accessToken that I updated in the userdefaults.</p>
  
  <p>The problem here is, the whole flow/code is working when I run the app on a Simulator, but not working on a ios devicce (tried on iphone 6s plus, iphone 6s running ios 9).</p>
  
  <p>Can anyone help why this is happening? Does observer has something to do with the devices?</p>