xamarin-fingerprint icon indicating copy to clipboard operation
xamarin-fingerprint copied to clipboard

iOS crashes when AuthenticationRequestConfiguration reason is empty string.

Open ttranbunnings opened this issue 2 years ago • 1 comments

Steps to reproduce

  1. Use request with empty string
  var request = new AuthenticationRequestConfiguration("Enable Touch ID", "");
  var setupResult = await CrossFingerprint.Current.AuthenticateAsync(request);

Expected behavior

Should not crash on iOS

Actual behavior

App crashes on iOS

Crashlog

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Non-empty localizedReason must be provided.

Configuration

**Version of the Plugin: 2.1.5

Works fine, no crash on Android with empty string for AuthenticationRequestConfiguration reason.

ttranbunnings avatar May 16 '22 07:05 ttranbunnings

Hi,

Have you tried what the error message suggests? (set a non-empty reason) :D If iOS want's a reason, the plugin can't do anything about it (except adding an additional validation).

smstuebe avatar May 16 '22 15:05 smstuebe