Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
purringpigeon
9 years agoExplorer | Level 4
Help migrating from v1 to v2 Objective C
Hello,
I am not very familiar with Dropbox API, though I got version 1 working just fine on my app. But I am not really following the path from V1 to V2 all that well.
I am attempting to...
Greg-DB
Dropbox Community Moderator
9 years agoThe app shouldn't be crashing without some sort of error. Can you double check the console in Xcode?
purringpigeon
9 years agoExplorer | Level 4
It's weird - The only error I show is the one noted above.
This always returns nil
self.restClient = [DropboxClientsManager authorizedClient];
- Greg-DB9 years ago
Dropbox Community Moderator
If authorizedClient is nil, that would be why your app doesn't seem to "remember" the user. That's presumably related to the crash you're getting. Perhaps the app is crashing before the access token is being stored. Can you step through in the debugger to at least see where the crash is occurring? - purringpigeon9 years agoExplorer | Level 4
I have tried - but the weird thing is once it hands back control to my application, it has disconnected from the debugger.
So I tried the following to force it to log something, but it doesn't.
- (void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; self.restClient = [DropboxClientsManager authorizedClient]; if (!networkLost) { [self checkForBackups]; } } - (void) checkForBackups { //Determine if backup exists NSLog(@"trying to check for backups"); if(self.restClient != nil ) { //_loadingView = [LoadingView loadingViewInView:[self.view.window.subviews objectAtIndex:0] withMessage:@"Checking for existing backup...."]; NSLog(@"You are linked: %@", self.restClient); [[self.restClient.filesRoutes getMetadata:@""]response:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) { if(result != nil){ } if(error != nil || routeError != nil){ NSLog(@"Error: %@", error); NSLog(@"Error: %@", routeError); } }]; } }So while I am in the same instance - when I open this after linking, it crashes. I have placed log statements - but they aren't fired. It's just odd..
- purringpigeon9 years agoExplorer | Level 4
So I upgraded my XCODE and was able to debug it - seems the getmeta data was killing me.
I am now able to have my instance cached once set.
- opp9 years agoNew member | Level 2
I am getting the same, disconnect from debugger 30 seconds after i get:
2017-06-05 15:39:08.116 DecadeFiveRecorderPlus[579:16632] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "(null)"
2017-06-05 15:39:08.118 DecadeFiveRecorderPlus[579:16632] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "(null)"
My plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string><another one></string>
<string>db-<app here here></string>
</array>
</dict>
</array>
If i install the dropbox app, it launches it for login.
Is there some setup on my 6s plus that could be causing it not to launch safari?
- Greg-DB9 years ago
Dropbox Community Moderator
opp You seem to be getting slightly different output that was previously shared on this thread. I.e., you're getting error: "(null)" which should actually indicate that nothing went wrong with the canOpenURL call.
That being the case, please open a new thread with the details (i.e., steps to reproduce, the code, and the version of the SDK you're using) so we can help you with it without spamming anyone else on this old thread.
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!