From 6b2c1fd32e068a25dccd0f9fda5357fdc9eb7c26 Mon Sep 17 00:00:00 2001 From: Pascal Clanget <24304457+Gh05d@users.noreply.github.com> Date: Sat, 21 May 2022 20:22:58 +0200 Subject: [PATCH] fix(keychain): mark useTouchID as required (#4182) `useTouchID` is not an optional parameter. When it is not explicitly set, the whole app crashes with this error: > Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull boolValue]: unrecognized selector sent to instance 0x111f02f08' This bug is known since November 2018 and likely won't be fixed: https://github.com/ionic-team/cordova-plugin-ios-keychain/issues/34 --- src/@awesome-cordova-plugins/plugins/keychain/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@awesome-cordova-plugins/plugins/keychain/index.ts b/src/@awesome-cordova-plugins/plugins/keychain/index.ts index afe2a2e00..e1899e9fa 100644 --- a/src/@awesome-cordova-plugins/plugins/keychain/index.ts +++ b/src/@awesome-cordova-plugins/plugins/keychain/index.ts @@ -17,7 +17,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl * * ... * - * this.keychain.set(key, value).then(() => { + * this.keychain.set(key, value, false).then(() => { * this.keychain.get(key) * .then(value => console.log('Got value', value)) * .catch(err => console.error('Error getting', err)); @@ -57,7 +57,7 @@ export class Keychain extends AwesomeCordovaNativePlugin { @Cordova({ callbackOrder: 'reverse', }) - set(key: string, value: string | number | boolean, useTouchID?: boolean): Promise { + set(key: string, value: string | number | boolean, useTouchID: boolean): Promise { return; }