I am newbie & trying to integrate SaleForce into our existing APP, need help in getting the credentials after authenticating. I am using the latest Mobile SDK 3.2 I followed the Mobile SDK Development Guide. Requirement is to not to authenticate at launch. So as per the guide I used below method.

[[SFAuthenticationManager sharedManager] loginWithCompletion:^(SFOAuthInfo *authInfo) {
           NSLog(@"SFCRM: Auth finished!");
       failure:^(SFOAuthInfo *authInfo, NSError *error) {
           NSLog(@"SFCRM:Auth failed: %@", error);

My authentication is successful, now how do I get the credentials, refresh_token etc? Do I need to implement SFAuthenticationManager or SFOAuthCoordinator delegate? In the app migration section its mentioned that, we don't need implement these delegate in the new mobileSDK.

Thanks, SKG.


Able to get it work by implementing SFAuthenticationManagerDelegate.

Once authentication was successful, this below delegate function will be called with the credentials.

- (void)authManagerDidAuthenticate:(SFAuthenticationManager *)manager credentials:(SFOAuthCredentials *)credentials authInfo:(SFOAuthInfo *)info {
    NSLog (@"didAuthenticate %@", credentials);
  • 1
    Hey SKG, can you add a little more info about what you did to implement it? I know it's not that complicated but it'd be useful to have the info here for future readers.
    – Matt Lacey
    May 4 '15 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.