SelfLender / react-native-biometrics

React Native module for iOS and Android biometrics
MIT License
664 stars 229 forks source link

iOS app crashes when prompt message is an empty string #267

Open eros-piccioni opened 1 year ago

eros-piccioni commented 1 year ago

When promptMessage is an empty string the a react-native 0.72.4 app crashes on iOS 17 on simulators and freezes on a physical device.

      const result = await this.rnBiometrics.simplePrompt({promptMessage: ''})

The exception even if the code is surrounded in a try catch is not caught. On android devices is caught correctly.

sbaiahmed1 commented 10 months ago

I dont know, but in iOS this is the error we get

NSInvalidArgumentException ·__56-[ReactNativeBiometrics simplePrompt:resolv...Non-empty localizedReason must be provided.

The localised reason must be provided ...