You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
purringpigeon
3 years agoExplorer | Level 4
Integration to Dropbox suddenly failing
I have a simple app that uploads a set of files to Dropbox as a back up - been working fine on V2 for years now it fails. Token is expired apparently.
I updated my cocoa pod today - but that brought more errors - Xcode fail to build, but the errors disappear and I have no idea what is broken.
I noticed the DropboxClientsManager was renamed, but that was the only error that was present in the project - updated from 2.0.6 to 3.0.15 - and it's all a mess - any guide i can use to fix this.
It looks like that's an error from CocoaPods itself so I can't really offer support for that, but it looks like there's a post about that error here.
- Greg-DBDropbox Staff
Dropbox is in the process of switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.
Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the OAuth Guide and authorization documentation.
For reference, while the creation of new long-lived access tokens is now deprecated, we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, you can continue using existing long-lived access token(s) without interruption, if you have any. Also, note though that after the change you won't be able to create new long-lived access tokens.
While the change began on September 30th 2021, we released it gradually, so you may not have seen your app(s) affected until more recently. Once it applies to your app, it would apply regardless of the "Access token expiration" setting for your app, and that setting may no longer be available for your app.The official Dropbox SDKs can handle the refresh process for you as long as you use a relatively recent version. For example, based on the version numbers you shared, it sounds like you're using the Dropbox Objective-C SDK. Support for short-lived access tokens/refresh tokens was introduced to that in v5.0.2 in August 2020. You can find the release history which indicates what changed for each release here. For example, as you mentioned, DropboxClientsManager was renamed in v3.0.0.
The latest version is currently v7.0.0. As long as you use the authorization flow with authorizeFromControllerV2 as documented, it will handle short-lived access tokens and the refresh process for you automatically.
I'm not sure what you mean by "but the errors disappear" though. That sounds like it may be an issue with Xcode itself, so you may need to refer to the resources for Xcode for help with that.
- purringpigeonExplorer | Level 4
Thank you - that makes sense - it only happens to people who are upgrading phones and have to relink their account then it works for a couple of hours, then dies.
I did a pod update today and only got to 3.0.15 - I am not seeing how to get anything later and the method you indicate authorizeFromControllerV2 is not there - is there a way to force going up to the 5.X as you mentioned?
Thanks.
- Greg-DBDropbox Staff
That should be controlled by your Podfile. For instance, v3.0.16 dropped iOS 8, so if you're still specifying support for iOS 8 in your Podfile, Cocoapods wouldn't upgrade you past that.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 7 hours agoIf 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 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!