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
migrating from API 1 to 2 - how do I know if I have OAuth 1 tokens?
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 se...
Bob S.15
9 years agoCollaborator | Level 9
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
Greg-DB
Dropbox Community Moderator
9 years agoIt sounds maybe like the architecture settings for your app and the pods don't match, or that you don't have arm64 listed in your build architectures. You can configure these in your project's "Build Settings", under "Architectures".
- Bob S.159 years agoCollaborator | Level 9
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?
- Greg-DB9 years ago
Dropbox Community Moderator
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
- Bob S.159 years agoCollaborator | Level 9
Hey Greg,
I don't really see anything in this Getting Started about tokens or extracting them? https://github.com/dropbox/dropbox-sdk-obj-c#get-started
I don't understand where these tokens come into it. It seems like if I just follow the authorization flow as described in "Getting Started", it would authorize the app?
EDIT: If you saw that earlier post about the 'image not found' error, I fixed that. I didn't have the framework as an embedded binary...
Thanks!
Bob
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!