キーチェーンラッパーを使用しています(別のスレッドで推奨されているように)
https://gist.github.com/1170641
エラーの原因となるコード:
//Save username + password to keychain
KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:@"PHP POS" accessGroup:nil];
[keychainItem setObject:username forKey:@"username"];
[keychainItem setObject:password forKey:@"password"];
例外:
2013-01-28 14:51:09.531 PHP POS[21078:c07] *** Assertion failure in -[KeychainItemWrapper writeToKeychain], /Users/cmuench/Desktop/PHP-Point-Of-Sale-Repos/PHP-Point-Of-Sale-iOS/KeychainWrapper/KeychainItemWrapper.m:305
2013-01-28 14:51:09.532 PHP POS[21078:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'
*** First throw call stack:
(0x13be012 0x1186e7e 0x13bde78 0xc1cf35 0x233e4 0x22859 0x34ec 0x4ef0 0x48e2 0x19f37b 0x1a8048 0x24c9bf 0x2534df 0x252fec 0x251f5e 0x25c076 0xdf43b 0x1dce05 0x1dce05 0x1dce05 0x1dce05 0xdf495 0xdee66 0xdf24b 0xd0cf8 0x225fdf9 0x225fad0 0x1333bf5 0x1333962 0x1364bb6 0x1363f44 0x1363e1b 0x225e7e3 0x225e668 0xce65c 0x255d 0x2485)
libc++abi.dylib: terminate called throwing an exception
注: これをシミュレーターで実行しています。