Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am finally getting around to updating my OLD apps from the original Dropbox IOS API to the new one. I'm looking at the migration guide, and the first thing it says is to check my OAuth tokens to see if they are version 1 or 2. How do I know which I have?
Also, the migration guide describes using the "endpoint" /oauth2/token_from_oauth1 to transition old tokens. So, I am coming to this from an ancient time -- what is an "endpoint", and is this 'token_from_oauth1' a function that you call from Objective-C in an iOS app? The documentation page I'm looking at only shows Python, Java, Ruby, and PHP examples, so maybe I'm not looking in the right place.
Is this where I should start? Is there a guide for upgrading an iOS app somewhere?
Also is this page current? It dates from March 2016, but then also there is a v1 deprecation warning at the top of it:
https://www.dropbox.com/developers-v1/core/sdks/ios
Thanks,
Bob
Hey Greg,
My iOS project has a "DropboxSDK.framework" in it, which looks like it is from December 2014. So it is probably OAuth1.
So, where do I find the API v2 Objective-C SDK? Is that link at the end of my post the correct one?
Thanks
Bob
OK thanks -- it says the minimum OS version is iOS 8. Does that mean Dropbox support is going to end for iOS7 devices in June? I'm still supporting older OS versions -- is there a way to use Dropbox API v2 and still do that?
Thanks
Bob
The API v2 Objective-C SDK itself supports iOS 8+. If you need to support older versions of iOS, you can either fork the SDK and make the necessary modifications for your use case, or call the HTTP interface for API v2 directly without using the SDK.
Hey Greg,
When compiling with the new iOS API SDK, I get this XCode warning:
ld: warning: ignoring file /Users/bob/Library/Developer/Xcode/DerivedData/Voxel-feiijazkmmkqehbmctcmaszabhor/Build/Products/Debug-iphoneos/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial, file was built for armv7 which is not the architecture being linked (arm64): /Users/bob/Library/Developer/Xcode/DerivedData/Voxel-feiijazkmmkqehbmctcmaszabhor/Build/Products/Debug-iphoneos/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial
Is there any way to get rid of that?
Thanks,
Bob
Okay thanks -- I looked at those and that stuff seems to match, but I have bigger problems for now.
Sorry for all the questions. I'm coming to this after several years of not touching this Dropbox code. I'm looking through my project for any reference to an OAuth token and not finding it. It looks like I set up the connection to Dropbox this way:
DBSession* dbSession =
[[[DBSession alloc]
initWithAppKey:@"xxxxxxxxx"
appSecret:@"xxxxxxxxx"
root:kDBRootAppFolder]
autorelease];
[DBSession setSharedSession:dbSession];
and then I use something called the 'restClient' to do all the interaction, like this:
restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
[restClient createFolder:path];
[restClient uploadFile:filename toPath:toPath fromPath:pngPath];
Does that look familiar? How would I go about moving to the new API from this?
The SDK handles the access token retrieval and storage for you, so you wouldn't have had to deal with it manually before, but you'll need to extract them in order to hand them off to the new SDK.
As far as the client for the new SDK is concerned, I recommend working through the readme here, which shows how to configure the authorization flow, and get a client for making calls:
https://github.com/dropbox/dropbox-sdk-obj-c#configure-your-project
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!