Is there any chance KeyChain value is unavailable in applicationWillEnterForeground in iOS?

111 views Asked by At

When opening the app from background i am calling one api, i need to send user mobile number in that api, mobile number is stored in KeyChain. Sometime in backend they are not getting mobile number. But i am not able to reproduce the issue.

so i want to know is there any chance KeyChain is unavailable applicationWillEnterForeground?

I am using below code for access mobileNumber in keyChain

//Storing   
 SSKeychainQuery *query = [[SSKeychainQuery alloc] init];
 query.service = serviceName;
 query.account = account;
 query.password = mobileNumber;


//Getting password
SSKeychainQuery *query = [[SSKeychainQuery alloc] init];
query.service = serviceName;
query.account = account;
[query fetch:error];
NSString *mobileNUmber =  query.password;

We are using Objective-C language..

0

There are 0 answers