jrendel / SwiftKeychainWrapper

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.
MIT License
1.59k stars 339 forks source link

Fails to retrieve stored values with odd error #79

Closed clayellis closed 1 year ago

clayellis commented 7 years ago

I'm seeing an odd, intermittent error every once in a while. I'll try to retrieve a value as the app is launching (in application(_:... didFinishLaunchingWithOptions)) and just as it fails to retrieve the value I'll consistently get an error printed out to the console that I don't see otherwise making me believe the two are related. Here is the error:

2016-11-25 12:07:01.600167 (MY_APP_IDENTIFIER)[7172:1224012] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2016-11-25 12:07:01.609110 (MY_APP_IDENTIFIER)[7172:1224012] [MC] Reading from public effective user settings.

And sometimes (I can't seem to find a pattern) this one is printed as well:

2016-11-25 12:40:37.032139 (MY_APP_IDENTIFIER)[7195:1232649] [MC] Invalidating cache

I've been looking into this and people are attributing this message to either user permissions settings or app groups (neither of which I am using.) Have you seen this happening at all? Ideas? Like I said, it's intermittent and extremely difficult to try to debug and is causing my users quite a bit of a headache as it automatically logs them out of my app.

clayellis commented 7 years ago

@jrendel Any idea what might be going on here?

jrendel commented 7 years ago

@clayellis Sorry I forgot to answer this. I have not actually seen this myself and I can't remember if I've used the wrapper during didFinishLaunchingWithOptions or not.

clayellis commented 7 years ago

@jrendel Do you think it could have anything to do with being called from didFinishLaumchingWithOptions? I don't know much in detail about the Keychain.

davidtperk commented 5 years ago

Any update on this? I'm also calling from didFinishLaunchingWithOptions and data loss seems to be sporadic, resulting in users getting logged out.