I have updated my salesforcesdk-ios to new version 5.3.0. After logging in successfully, I set all these values in this delegate -oauthCoordinatorDidAuthenticate:authInfo: like this,
- (void) oauthCoordinatorDidAuthenticate: (SFOAuthCoordinator *) coordinator authInfo:(SFOAuthInfo *)info {
[SFAuthenticationManager sharedManager].coordinator = coordinator;
[[SFAuthenticationManager sharedManager] coordinator].credentials = coordinator.credentials;
[[SFUserAccountManager sharedInstance] applyCredentials:coordinator.credentials];
}
When I try validating for the refreshtoken currentUser is nil in - (void)send:(SFRestRequest *)request delegate:(id)delegate shouldRetry:(BOOL)shouldRetry and always loads salesforce login page instead of sending request to Salesforce.
// If there are no demonstrable auth credentials, login before sending. SFUserAccount *user = [SFUserAccountManager sharedInstance].currentUser;
user is always nil. How to set the useraccount correctly? Thanks!
First, I think you could check the delegate oauthCoordinatorDidAuthenticate:authInfo: is worked. like:
}
It could cause user is nil, when the delegate is not worked.