Hi,
I need advice on implementation of Dropbox API v2 for all platforms mentioned in the subject. I have an app that currently uses iCloud to sync data between iPhone, iPad and Mac and would like to use Dropbox to do the same on all platforms. Currently I use Dropbox Core API v1. I managed to take my iCloud implementation and in a few days I replaced iCloud API calls by Dropbox API calls. It works great, but Dropbox API v1 is deprecated. This was my first implementation of Dropbox and I just wanted to see how difficult it would be to implement Dropbox. Now I need the final version, unfortunately API v2 for Objective-C is not released yet. The question is if there is a solution, which would work on all platforms. I could use Python on desktop computers, Objective-C (or perhaps Swift) on iOS and Java on Android, but it is just too much code to maintain.
I use the same C++ code for business logic on all platforms, C++ for UI on Windows, Linux and Mac OS X and Objective-C for UI on iOS. The best solution would be API v2 for C++.
Is there a C++ implementation, which would simply use API v2 directly through HTTP calls?
If not, I could implement it myself, but there are other potential issues. For example OAuth2 response type "token" requires custom URI", which has some issues on iOS 9.2 and 9.3. It is also possible that Apple discontinues custom URIs, which means OAuth2 used this way might not work on future versions of iOS. I could use response type "code", but that requires browser-like capability (or webview if I use iOS term), so that user could enter username and password. This isn't a very good user experience, because my app is rich client. Perhaps I could parse html and submit username and password and then parse resulting html to read authentication token. But any of these solutions aren't ideal.
Is there a better solution?
Would it be possible to send simple HTTP request with app id, username, password (ideally this would automatically approve the app in user's dropbox account) and get HTTP response with token???
Does anybody have a good solution for API v2 involving just one code for all platforms?
Thanks.