Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keychain returns nil #106

Closed
rashidasgari opened this issue Sep 23, 2015 · 16 comments
Closed

keychain returns nil #106

rashidasgari opened this issue Sep 23, 2015 · 16 comments

Comments

@rashidasgari
Copy link

Hi, I got this weird problem, When i wanna retrieve from keychain it works fine, but just after that when i wanna do it again in another class i get nil.

this is how i call it:
keyChain = [UICKeyChainStore keyChainStoreWithService:@"myapp.Login"];

@kishikawakatsumi
Copy link
Owner

It seems too strange. Could you please share reproducible project for further investigation?

@rashidasgari
Copy link
Author

@kishikawakatsumi Since the project is for a client of mine i cannot share any code. But the line i shared is how i access the keychainstore in both classes.

@rashidasgari
Copy link
Author

I am still having problem with this on ios9.

@melochale
Copy link

Hi guys, I met this problem by using SSKeychain(another keychain wrapper). Here it is the link soffes/SAMKeychain#75 of related github issue.

@rashidasgari
Copy link
Author

@melote thanks melo, this problem happen to strike me from time to time and i havnt been able to find any solution to it. Tried almost everything and im starting to think that its related to iOS9.

@melochale
Copy link

Hi @rashidasgari , I was the same and I can't find any reason or solution, I met this problem on ios 8.4.x recently as well. sometimes it returned nil, otherwise it's ok most of the time.

@rashidasgari
Copy link
Author

@melote Its getting a bit frustrating. @kishikawakatsumi did you have any luck simulating this yet?

@rashidasgari
Copy link
Author

This seems like a bug in keychain. Another bunch of people are having the exactly same problem with another wrapper: nicklockwood/FXKeychain#18

@rashidasgari
Copy link
Author

@kishikawakatsumi I just found out that this behavior only happens when the device is connected to my computer and im running the app directly from xcode.

@hellChine
Copy link

I have the same problem . I use the NSUserDefaults and UICKeyChainStore now。

@gbau
Copy link

gbau commented Dec 5, 2015

Like @rashidasgari, I'm experiencing this problem only when running from xcode. I'm using v2.1.0. @kishikawakatsumi any luck reproducing on your end?

@kunwarr
Copy link

kunwarr commented Jan 15, 2016

@kishikawakatsumi I am facing the same issue as describe by everyone. Earlier it was just when i connect to Xcode, now its all the time.

@zhihuitang
Copy link

ios 9.x, swift 2.0, same problem with me :(

@PrakashMaharjan
Copy link

Have anybody found solution for this issue? If yes please share here..
thanks

@sroelli
Copy link

sroelli commented Sep 9, 2016

Adding the "Share keychain entitlement" worked for me.
https://forums.developer.apple.com/message/170381#170381

@kishikawakatsumi
Copy link
Owner

kishikawakatsumi commented Sep 16, 2016

Please add code signing entitlements to the app. From iOS 10, entitlements file is always needed for writing Keychain even without sharing.

screen shot 2016-09-14 at 22 48 41

screen shot 2016-09-14 at 22 53 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants