function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

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?



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 




- (void)logout {