FXKeychain icon indicating copy to clipboard operation
FXKeychain copied to clipboard

Added errors when keychain operations fail

Open MrNickBarker opened this issue 7 years ago • 1 comments

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
}

MrNickBarker avatar Mar 31 '17 13:03 MrNickBarker

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

niveus avatar Jun 27 '17 19:06 niveus