Skip to content

Commit

Permalink
Merge pull request #3 from astrochili/master
Browse files Browse the repository at this point in the history
Added iOS error description printing
  • Loading branch information
britzl authored Aug 26, 2020
2 parents 37a7334 + a895cb4 commit 0a3117d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions siwa/src/siwa_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ - (void) getCredentialState
// TODO: docs provide no information about what type of errors we can expect:
// https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidprovider/3175423-getcredentialstateforuserid?language=objc
if (error) {
dmLogError("getCredentialStateForUserID completed with error");
NSString *errorMessage = [NSString stringWithFormat: @"getCredentialStateForUserID completed with error: %@", [error localizedDescription]];
dmLogError(errorMessage);
}

SiwaCredentialState state = STATE_UNKNOWN;
Expand Down Expand Up @@ -129,7 +130,8 @@ - (void)authorizationController:(ASAuthorizationController *)controller
// The Auth controller callback for getting an error during authorization
- (void)authorizationController:(ASAuthorizationController *)controller
didCompleteWithError:(NSError *)error {
Siwa_QueueAuthFailureCallback("authorization error!");
NSString *errorMessage = [NSString stringWithFormat: @"Authorization error: %@", [error localizedDescription]];
Siwa_QueueAuthFailureCallback(errorMessage);
}

@end
Expand Down

0 comments on commit 0a3117d

Please sign in to comment.