We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

mrobinson's avatar
mrobinson
Helpful | Level 6
8 years ago

iOS Obj-C Example of [DBClientsManager unlinkAndResetClients]

I downloaded the examples and can't find a instance of how to use this function:

 

This code doesn't not unlink or reset clients: 

 

- (IBAction)didPressUnlink {
    [DBClientsManager unlinkAndResetClients];
    
    linkButton.hidden=NO;
    unlinkButton.hidden=YES;
    
}

 

 

Thoughts?

thanks

  • Greg-DB's avatar
    Greg-DB
    8 years ago
    That "< Dropbox" is a feature of recent versions of iOS. It's a shortcut back to the previous app after you switch between apps. That's a system feature, so I don't believe we have control over it, but it doesn't indicate that you're still in Dropbox.

    Regarding the openURL issue, your code looks right. That openURL method should get called after the user authorizes the app to connect to their Dropbox account. What steps are you taking to reproduce this issue specifically? Is nothing getting logged because authResult is nil?
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    There's an example of using unlinkAndResetClients in the sample app here. Your usage looks correct though, and the method is working correctly for me.

     

    How are you checking if it worked? You generally should just check if [DBClientsManager authorizedClient] is not nil. Also, what version of the SDK do you have installed? Please update to the latest if you aren't already using it. 

    • mrobinson's avatar
      mrobinson
      Helpful | Level 6

      Hello 

       

      I just noticed that my app is has "< Dropbox" in the upper left corner, shouldn't it leave the dropbox app after authentification?

       

      It looks like it is "Pushing" to my app instead of leaving dropbox.

       

       

       

      It seems to me that something is amiss with the method below:

       

      No results are being "NSlogged" upon login:

       

      - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
                  options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
          DBOAuthResult *authResult = [DBClientsManager handleRedirectURL:url];
          if (authResult != nil) {
              if ([authResult isSuccess]) {
                  NSLog(@"Success! User is logged into Dropbox.");
                 
              } else if ([authResult isCancel]) {
                 
                  
                  NSLog(@"Authorization flow was manually canceled by user!");
              } else if ([authResult isError]) {
                  NSLog(@"Error: %@", authResult);
              }
          }
          return NO;
      }

       

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        That "< Dropbox" is a feature of recent versions of iOS. It's a shortcut back to the previous app after you switch between apps. That's a system feature, so I don't believe we have control over it, but it doesn't indicate that you're still in Dropbox.

        Regarding the openURL issue, your code looks right. That openURL method should get called after the user authorizes the app to connect to their Dropbox account. What steps are you taking to reproduce this issue specifically? Is nothing getting logged because authResult is nil?