Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Bob S.15
9 years agoCollaborator | Level 9
DropboxClientsManager authorizeFromController not doing anything
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.
...
- 9 years ago
Hey Greg,
Finally found it. I was skipping the call to DBClientsManager setupWithAppKey! It was in there, but I was mistakenly skipping it when my app had stored the preference that Dropbox was disconnected. It's weird that that produces no error messages. I found the problem by stepping in the debugger into authorizeFromController and noticing that both my sharedApplication and controller arguments were 'nil', even though they were valid values when I passed them. Then I noticed the assert in that function:
NSAssert([DBOAuthManager sharedOAuthManager] != nil, @"Call `Dropbox.setupWithAppKey` or `Dropbox.setupWithTeamAppKey` before calling this method");As soon as I saw that, I knew what I had done.
I guess that the assert never fired, because [DBOAuthManager sharedOAuthManager] is a valid number even if you have not called setupWithAppKey?
Anyway thanks for helping me with this problem, I really appreciate it. I'll probably run into more but at least this one is down.
Bob
Greg-DB
Dropbox Community Moderator
9 years agoI do get an exception thrown with the message:
*** Assertion failure in +[DBClientsManager authorizeFromController:controller:openURL:], test_project/Pods/ObjectiveDropboxOfficial/Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/DBClientsManager+MobileAuth-iOS.m:20
2017-04-19 11:40:19.423 test_project[44538:72659315] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Call `Dropbox.setupWithAppKey` or `Dropbox.setupWithTeamAppKey` before calling this method'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e14ab0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d50c141 objc_exception_throw + 48
2 CoreFoundation 0x000000010e14ecf2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010b63a3b6 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 test_project 0x000000010b01bb69 +[DBClientsManager(MobileAuth) authorizeFromController:controller:openURL:] + 393
5 test_project 0x000000010b011a3f -[ViewController didPressLink:] + 223
6 UIKit 0x000000010bca9d22 -[UIApplication sendAction:to:from:forEvent:] + 83
7 UIKit 0x000000010be2e25c -[UIControl sendAction:to:forEvent:] + 67
8 UIKit 0x000000010be2e577 -[UIControl _sendActionsForEvents:withEvent:] + 450
9 UIKit 0x000000010be2d4b2 -[UIControl touchesEnded:withEvent:] + 618
10 UIKit 0x000000010bd1749a -[UIWindow _sendTouchesForEvent:] + 2707
11 UIKit 0x000000010bd18bb0 -[UIWindow sendEvent:] + 4114
12 UIKit 0x000000010bcc57b0 -[UIApplication sendEvent:] + 352
13 UIKit 0x000000010c4a8adc __dispatchPreprocessedEventFromEventQueue + 2926
14 UIKit 0x000000010c4a0a3a __handleEventQueue + 1122
15 CoreFoundation 0x000000010e0f0c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 CoreFoundation 0x000000010e0d60cf __CFRunLoopDoSources0 + 527
17 CoreFoundation 0x000000010e0d55ff __CFRunLoopRun + 911
18 CoreFoundation 0x000000010e0d5016 CFRunLoopRunSpecific + 406
19 GraphicsServices 0x0000000113a2ba24 GSEventRunModal + 62
20 UIKit 0x000000010bca80d4 UIApplicationMain + 159
21 test_project 0x000000010b01220f main + 111
22 libdyld.dylib 0x000000010effa65d start + 1
23 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
srinivas1995
8 years agoExplorer | Level 3
I'm also Getting same issue.Help to me
- Greg-DB8 years ago
Dropbox Community Moderator
srinivas1995 Please open a new thread with the specifics of the issue you're seeing so we can take a look. Thanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!