ionic-team / cordova-plugin-ios-keychain

Apache Cordova (PhoneGap) plugin
Other
62 stars 44 forks source link

Can not set data for ios12 #34

Open iouhammi opened 5 years ago

iouhammi commented 5 years ago

Hello,

I am not able to set keychain. the app crashes with the following error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull boolValue]: unrecognized selector sent to instance 0x111f02f08'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000111c9029b __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x0000000110a70735 objc_exception_throw + 48
    2   CoreFoundation                      0x0000000111caefa4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x0000000111c94fb6 ___forwarding___ + 1446
    4   CoreFoundation                      0x0000000111c96e88 _CF_forwarding_prep_0 + 120
    5   تحدي العرب                 0x000000010c15c765 __19-[CDVKeychain set:]_block_invoke + 437
    6   libdispatch.dylib                   0x000000011642b5d1 _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x000000011642c63e _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x000000011642f0a0 _dispatch_queue_override_invoke + 1028
    9   libdispatch.dylib                   0x000000011643d028 _dispatch_root_queue_drain + 351
    10  libdispatch.dylib                   0x000000011643d9cd _dispatch_worker_thread2 + 130
    11  libsystem_pthread.dylib             0x0000000116818169 _pthread_wqthread + 1387
    12  libsystem_pthread.dylib             0x0000000116817be9 start_wqthread + 13

I test it on ios12.0.1.

champion007 commented 5 years ago

You must pass all the parameters of the plugin -

var touchID =false
Keychain.set(this.successCallback, this.failureCallback, 'user_data_beta', "some random value", touchID);

Still you face issue, submit the code here for better understanding...

EinfachHans commented 4 years ago

Run in the Same issue today. Exception thrown at this Line when don't set a useTouchId Boolean:

BOOL useTouchID = [[arguments objectAtIndex:2] boolValue];

Setting it to false, did the Trick, but would be great if this can be fixed. Is this Plugin still maintained? I can create a PR if anyone would merge it 🤔

WuglyakBolgoink commented 4 years ago

@HansKrywaa PR's are always welcome )

EinfachHans commented 3 years ago

@mlynch seems like this is fixed on master but not released yet. It has been released last time 4 years ago and some work has been done after that, can you release a new version?