cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

migrating from API 1 to 2 - how do I know if I have OAuth 1 tokens?

migrating from API 1 to 2 - how do I know if I have OAuth 1 tokens?

Bob S.15
Collaborator | Level 9

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

 

54 Replies 54

Bob S.15
Collaborator | Level 9

Yes, I followed the instructions exactly.  I tried it a couple of times.    What's weird is that earlier today it worked, but now it doesn't.  I think something about changing project targets might screw with the behavior.

 

I also, like that guy in the link, had some success by using Embedded Binaries earlier and then found it switching behaviors on me. I don't know, something seems flaky with that Carthage setup.    I am trying the CocoaPods method now.

 

 

 

 

Bob S.15
Collaborator | Level 9

The CocoaPods method does not work for me either.  I get this, for one thing:

 

Target 'ObjectiveDropboxOfficial' of project 'Pods' was rejected as an implicit dependency for 'ObjectiveDropboxOfficial.framework' because its architectures 'arm64' didn't contain all required architectures 'armv7 arm64'

Target 'Pods-XXXXXX' of project 'Pods' was rejected as an implicit dependency for 'Pods_XXXXXX'.framework' because its architectures 'arm64' didn't contain all required architectures 'armv7 arm64'

 

I don't like having to use the workspace file and having this CocoaPods thing screw with my XCode project, so I am going to restore from my TimeMachine backup and go back to trying to get the Carthage method to work.

 

 

Bob S.15
Collaborator | Level 9

Well, I got both of my builds to upload without iTunes complaining -- but there is definitely something weird going on.  This morning I ripped out the Dropbox framework and settings, and installed it again via Carthage.  My first target worked perfectly, uploaded fine.  But the second target wouldn't run -- 'image not found'.  I compared every setting for the two targets and they were exactly the same.  I 'fixed' the second target by embeddeding the Dropbox framework as a binary -- it ran -- but it still wouldn't upload to iTunes due to those architecture errors.

 

Then without doing anything but updating the version number, I rebuilt both targets and they both ran, both uploaded too.   I'm worried that my XCode project has something corrupted in it, because it is unpredictable, building a working version one minute and then a broken one the next, without me changing anything.  Also my XCode hung when I tried to quit.

 

Anyway Greg thanks for all the help, sorry I bothered you with so many questions about this new API.  

Bob

 

Greg-DB
Dropbox Staff
Thanks for following up. Sorry to hear about these building issues, but I'm glad you were able to get working builds. And no problem about the questions, that's what I'm here for!

(By the way, I highly recommend putting your project in version control and committing before any significant changes, as it can make undoing/recovering in cases like that much easier.)

Greg-DB
Dropbox Staff
Hi Bob, apologies for the delay. I was only just notified of your post about the extraneous console output on 2/15. I believe that's some extra output from Xcode as covered here:

https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-8-logs/39461256#39461256
Need more support?
Who's talking

Top contributors to this post

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