title: iOS random character being dropped in uitextfield
body: <p>I"m saving my user email id, password and auth token in keychain. Sometimes, the password text alone drops a character, but others doesn't. I couldn't figure out what is causing this problem. Initially I had these saved in NSUserDefaults and the same thing happened. I thought moving to keychain would fix this issue. But it didn't. I have wasted days trying to figure this out. Any help will really be appreciated.</p>
  
  <p>This is how I'm saving:</p>
  
  <pre><code>[keychainItem setObject:userEmailId forKey:(__bridge id)kSecAttrAccount];
  [keychainItem setObject:userPassword forKey:(__bridge id)kSecValueData];
  </code></pre>
  
  <p>and retrieving the password.</p>
  
  <pre><code>NSData *password =[keychainItem objectForKey:(__bridge id)(kSecValueData)];
  userPassword = [[NSString alloc] initWithData:password encoding:NSUTF8StringEncoding];
  NSLog(@"Password from keychain = %@ and textfield = %@",userPassword,txtPassword.text);
  userEmailId = [keychainItem objectForKey:(__bridge id)kSecAttrAccount];
  </code></pre>
  
  <p>The userPassword or txtPassword.text is never being accessed or changed anywhere else.</p>