You need to sign in to do that
Don't have an account?
log out button
I want to make a log out button in a native xcode app, i use this for make the log out
SFNativeRestAppDelegate *sf=[[SFNativeRestAppDelegate alloc] init];
[sf.coordinator revokeAuthentication];
[sf.coordinator authenticate];
The problem is that it porduces an exception that say`s
[SFNativeRestAppDelegate oauthRedirectURI]: unrecognized selector sent to instance 0x869ae10'
My code of this method in the class SFNativeRestApp delegate is the next:
- (NSString*)oauthRedirectURI {
NSLog(@"You must override this method in your subclass1");
[self doesNotRecognizeSelector:@selector(oauthRedirectURI)];
return nil;}
I expect someone could help me, im new in this and i really don`t understand very good what this method is doing.
I already responded to your previous thread with a solution. Did this not work?
http://boards.developerforce.com/t5/Mobile/Log-off/td-p/463227
I put the breakpoint, it`s actually enter in the action.
simply call in logout button action
SFNativeRestAppDelegate *nativeDelegate = (SFNativeRestAppDelegate *)[[UIApplicationsharedApplication]delegate];
[nativeDelegate logout];
this method redircts you to login page.
in SFNativeRestAppDelegate.m file
implement
- (void)logout {
[selfsetupAuthorizingViewController];
[self.coordinatorrevokeAuthentication];
[self.coordinatorauthenticate];
}