Does the QuickBlox SDK for iOS include a method for checking / storing a valid user session?
Unless the user has specifically logged out, they should be automatically logged back in. Does the SDK have a built in mechanism for dealing with this or do I need to store the username and password, if I'm storing the info what needs to be stored for a FB login?
For example, you created session with facebook login
QBASessionCreationRequest *extendedAuthRequest = [QBASessionCreationRequest request];
extendedAuthRequest.socialProvider = @"facebook";
extendedAuthRequest.socialProviderAccessToken = @"BAAE74iZBvNR0BAFCnyIIvdbdslDZCbIyzqDtT1oWg4dYYQoUl2tsBGMAZCFJX1x2x0h116OF0rObZC3WwtjjtS9rHiwcsvwvlI4pk0RTObCZAvkfUZCGxatsLykeWmC4";
[QBAuth createSessionWithExtendedRequest:extendedAuthRequest delegate:self];
Your session will be expired in 2 hours after last request to QuickBlox API. And next, you will get "Required session does not exist"
you should recreate session manually in this case (i mean repeat above query)
To check session expiration date use next snippet:
NSDate *sessionExpiratioDate = [QBBaseModule sharedModule].tokenExpirationDate;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With