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

Added errors when keychain operations fail #44

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MrNickBarker
Copy link

Since #38 only returns parser errors, this is an expansion that returns errors when keychain operations fail.

I implemented this because I have edge cases where reading from keychain fails because the device is locked or is starting and it is more reliable to check the returned error than to look at the app state.

NSError *error = nil;
_authToken = [[FXKeychain defaultKeychain] objectForKey:kAuthTokenKey error:&error];
if ([error.domain isEqualToString:kFXKeychainErrorDomain] && error.code == errSecInteractionNotAllowed) {
    // unable to load token, retry after a short pause
}

@niveus
Copy link

niveus commented Jun 27, 2017

I would like to see this merged. Is this project dead?

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

Successfully merging this pull request may close these issues.

3 participants