We are facing a problem on IOS(iPad OS) devices when authorized users are logged out from applications when they hide applications in background mode. This problem appears after we had updated Mobile SDK from the 8.3 to the 9.1.1 version. So if we have any background processes, such as asking Salesforce about Auth Credentials for background sync or fetch local notifications - application keychain access to the database lost.
And here is an errors from log:
[SalesforceSDKCore] CLASS: SFCrypto Could not save the base app identifier to the keychain (result: (null)). Retrying.
[SalesforceSDKCore] CLASS: SFCrypto Could not persist the base app identifier. Returning in-memory value.
[SalesforceSDKCore] CLASS: SFGeneratedKeyStore Error saving key com.salesforce.keystore.generatedKeystoreKeychainId_*[SOME_ID]* store to the keychain.
[SalesforceSDKCore] CLASS: SFOAuthKeychainCredentials Could not read com.salesforce.oauth.refresh from keychain, Error Domain=com.salesforce.security.keychainException Code=-25308 "User interaction is not allowed." UserInfo={NSLocalizedDescription=User interaction is not allowed., com.salesforce.security.keychainException.errorCode=-25308}
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
Issue is being reproduced only on physical devices, not simulator for Hybrid (Cordova) and IOS application
This problem is very urgent and critical, because with logout - users lost their databases, which contain a lot of local data for a long time.
For sure, we have reports about such logout in the 8.3 version, but it wasn't clearly expressed and can't be reproduced by our powers.