Ting Ting
Ting Ting

Reputation: 1

Terminating app due to uncaught exception 'Unable to generate key pair.', reason: 'Keychain returned the following status: -25308'

I have an app, and it need to run at background and upload data to my server. I have this below crash issues when i'm trying make http call while my device at screen lock with passcode. Im deploy using Xcode 8.0 in IOS 10 Device.

Below is my logs:-

2016-10-20 15:45:51.993433 XXX[2339:680871] [ERROR] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:222 :: generating keypair --> Failed

2016-10-20 15:45:51.999508 XXX[2339:680871] [FATAL] [WORKLIGHT] Uncaught Exception: Keychain returned the following status: -25308

2016-10-20 15:45:51.993433 XXX[2339:680871] : AIR[2355]/1#4 LF=0 add Error Domain=NSOSStatusErrorDomain Code=-25308 "ks_crypt: e00002e2 failed to 'oe' item (class 6, bag: 0) Access to item attempted while keychain is locked." UserInfo={NSDescription=ks_crypt: e00002e2 failed to 'oe' item (class 6, bag: 0) Access to item attempted while keychain is locked.}

I had also done two case scenario wherby:-

  1. Remove device passcode, make http call when my app is lock. This working fine and didn't throw any error.
  2. With device passcode, make http call when my app is lock. This is the one throwing the particular error.

I had also done enable keychain sharing in capabilities with value "worklight.group"...But still not working. Can anybody help me? Thank you very much ><

Upvotes: 0

Views: 419

Answers (1)

Vittal Pai
Vittal Pai

Reputation: 3563

Mobilefirst iOS Client SDK currently do not support requests running in the background. You can use non-MFP API's if you are accessing unsecured resources.

UPDATE on April 24th 2017 :

Mobilefirst iOS 8.0 Client SDK supports background requests in February 2017 iFix release on-wards.

Upvotes: 1

Related Questions