{"action":"created","issue":{"url":"https://api.github.com/repos/soffes/sskeychain/issues/75","labels_url":"https://api.github.com/repos/soffes/sskeychain/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/soffes/sskeychain/issues/75/comments","events_url":"https://api.github.com/repos/soffes/sskeychain/issues/75/events","html_url":"https://github.com/soffes/sskeychain/issues/75","id":41676951,"number":75,"title":"Keychain data seems to be disappearing","user":{"login":"abc2mit","id":4510849,"avatar_url":"https://avatars.githubusercontent.com/u/4510849?v=3","gravatar_id":"","url":"https://api.github.com/users/abc2mit","html_url":"https://github.com/abc2mit","followers_url":"https://api.github.com/users/abc2mit/followers","following_url":"https://api.github.com/users/abc2mit/following{/other_user}","gists_url":"https://api.github.com/users/abc2mit/gists{/gist_id}","starred_url":"https://api.github.com/users/abc2mit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abc2mit/subscriptions","organizations_url":"https://api.github.com/users/abc2mit/orgs","repos_url":"https://api.github.com/users/abc2mit/repos","events_url":"https://api.github.com/users/abc2mit/events{/privacy}","received_events_url":"https://api.github.com/users/abc2mit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2014-09-02T05:38:15Z","updated_at":"2015-01-15T12:24:19Z","closed_at":"2014-10-23T23:28:38Z","body":"SSKeychain has been working well for almost a year while I'm developing my app. I've run into a problem recently though that I haven't seem to be able to trace. Once in a while (and it seems random at times), the data I store in the keychain will now disappear. I'm not doing anything differently than before, so I'm not sure why the data isn't persisting.\r\n\r\nI'm currently on iOS 7.1.1 on an iPhone 5S. Using Xcode6-beta6 and AppCode 3.0.4.\r\n\r\nWhen I check ```[SSKeychain allAccounts]``` in debug, the array is empty.\r\n\r\nHere's my code to create a new device ID, for example:\r\n\r\n    + (NSUUID *)getDeviceID:(BOOL)refresh {\r\n        NSError *error;\r\n        NSString *deviceKey = [self getAppConfiguration:refresh][DEVICE_KEY];\r\n        NSString *deviceUUID = [SSKeychain passwordForService:KEYCHAIN_SERVICE_IDENTIFIER account:deviceKey error:&error];\r\n        if (deviceUUID) {\r\n            return [[NSUUID UUID] initWithUUIDString:deviceUUID];\r\n        }\r\n\r\n        if (error) {\r\n            NSLog(@\"Unable to retrieve the device ID because of an error: %@\", [error localizedDescription]);\r\n        }\r\n\r\n        // one does not exist, so create one\r\n        NSUUID *newUUID = [NSUUID UUID];\r\n        deviceUUID = [newUUID UUIDString];\r\n        [SSKeychain setPassword:deviceUUID forService:KEYCHAIN_SERVICE_IDENTIFIER account:deviceKey];\r\n        return newUUID;\r\n    }\r\n\r\nAnyone else see this happening or have some ideas on what might be causing the issue?"},"comment":{"url":"https://api.github.com/repos/soffes/sskeychain/issues/comments/70078360","html_url":"https://github.com/soffes/sskeychain/issues/75#issuecomment-70078360","issue_url":"https://api.github.com/repos/soffes/sskeychain/issues/75","id":70078360,"user":{"login":"diegopizzocaro","id":481178,"avatar_url":"https://avatars.githubusercontent.com/u/481178?v=3","gravatar_id":"","url":"https://api.github.com/users/diegopizzocaro","html_url":"https://github.com/diegopizzocaro","followers_url":"https://api.github.com/users/diegopizzocaro/followers","following_url":"https://api.github.com/users/diegopizzocaro/following{/other_user}","gists_url":"https://api.github.com/users/diegopizzocaro/gists{/gist_id}","starred_url":"https://api.github.com/users/diegopizzocaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegopizzocaro/subscriptions","organizations_url":"https://api.github.com/users/diegopizzocaro/orgs","repos_url":"https://api.github.com/users/diegopizzocaro/repos","events_url":"https://api.github.com/users/diegopizzocaro/events{/privacy}","received_events_url":"https://api.github.com/users/diegopizzocaro/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T12:24:19Z","updated_at":"2015-01-15T12:24:19Z","body":"So even after having introduced the kSecAttrAccebleAlways in appDidFinishLaunching I am still experience the issue with iOS 8.1.2\r\nI've now tried to include the same instruction into the methods appDidEnterBackground and also in appDidBecomeActive\r\nGoing a little blind here due to the intermittency of the issue..."}}