Need Help for Salesforce ios SDK (aka i want to call login screen VC )
I have been using the salesforce ios native sdk i have been encountering a
problem can any body help me out.I have been notified that [[[SFRestAPI
sharedInstance] coordinator] authenticate]; command would push/call the
login screen but its not.
I get the message "view is not in the window hierarchy! "
But i have instantiated the storyboard from app delegate once the user
does the authentication using following method
(UIViewController*)newRootViewController {
[self addDeviceTokenToChatter];
[self getTheUcsfUserId];
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"MainStoryboard"
bundle:nil];
UINavigationController * myStoryBoardInitialViewController = [sb
instantiateInitialViewController];
return myStoryBoardInitialViewController;
}
Now i have tried logging out using the following function
-(void)logoutofTheApp
{
[[[SFRestAPI sharedInstance] coordinator] revokeAuthentication];
[[[SFRestAPI sharedInstance] coordinator] authenticate];
// [[UIApplication sharedApplication] openURL:[NSURL
URLWithString:@"prefs://"]];
}
i get this message "view is not in the window hierarchy! "
No comments:
Post a Comment