cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DropboxClientsManager authorizeFromController not doing anything

DropboxClientsManager authorizeFromController not doing anything

Bob S.15
Collaborator | Level 9
Go to solution

Hello,

 

   I'm having trouble presenting the Dropbox login to the user.  I had it working some time ago, but today I tried it and nothing happens.  I make this call and nothing happens.  

 

 

 [DropboxClientsManager authorizeFromController:[UIApplication sharedApplication]
                                        controller:VC
                                           openURL:^(NSURL *url) {
                                               [[UIApplication sharedApplication] openURL:url];
                                           }
                                       browserAuth:NO];

 

I've tried it with browserAuth set to YES too, and get the same problem.  Has anything changed recently?  

I don't see any errors or any text at all on the console.  Any idea what could be the problem?

 

Thanks

Bob

 

36 Replies 36

Greg-DB
Dropbox Staff
Go to solution

This project does not fire the assert for me. It does print:

 

yah 0
yah 0

What's different in this project? Did you change a project setting or is it something in the code?

 

Bob S.15
Collaborator | Level 9
Go to solution

Hey Greg,

 

   As far as I know, there is nothing different about the project.  I just added the print statements to print out the value of sharedOAuthManager.  That's the standalone project you linked to earlier in this thread.

 

Bob

Greg-DB
Dropbox Staff
Go to solution
Interesting. In that case I'll dig into it further now that I can reproduce it. Thanks!

Greg-DB
Dropbox Staff
Go to solution
Ok, I determined what the issue is here. Whether or not the assert occurred depended on the ENABLE_NS_ASSERTIONS build setting. By default, that build setting varies depending on which scheme you're building for. (It's Debug:Yes, Release:No.)

When using Cocoapods (as I often do when testing things) the scheme used for the Dropbox library is whatever scheme you're building your project with. While developing an app, that's typically the Debug scheme.

When using Carthage however, the Dropbox library is built when you run `carthage`, which by default uses the Release scheme. (This is configurable using Carthage's `--build` setting.)

These differences are what caused the inconsistency when trying to reproduce this across projects (since it depended on the setting/scheme/installation method.)

We're going to change this assert into a log statement so that it will happen irrespective of these conditions.

Thanks for your help and patience tracking this down!

Bob S.15
Collaborator | Level 9
Go to solution

Ah, that makes sense.  Thanks for helping me find the problem in my app!

Bob

 

srinivas1995
Explorer | Level 3
Go to solution

I'm also Getting same issue.Help to me

Greg-DB
Dropbox Staff
Go to solution

@srinivas1995 Please open a new thread with the specifics of the issue you're seeing so we can take a look. Thanks!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    srinivas1995 Explorer | Level 3
  • User avatar
    Bob S.15 Collaborator | Level 9
What do Dropbox user levels mean?