you can manage (store) multiple users dropbox in ios? and if so, how?
thanks
Yes, this is certainly possible. In the official Dropbox iOS SDKs, for example, you can use the linkFromController method to link as many accounts as you want, and it will store the access tokens for you in the keychain, identified using the relevant user IDs. You can then retrieve the account again later when you need it.
linkFromController
If you're not using one of the SDKs, the idea is the same, but you'll need to manage the storage of the multiple access tokens manually.
ok, i have I tried with two accounts i call linkFromController and store in my app the uid now how i switch between account without having to restart the app ?
thanks !!
In the iOS Core SDK, when you have a DBSession with more than one account linked to it, you specify the user ID for the account you want to use when you construct a DBRestClient, using:
DBSession
DBRestClient
- (id)initWithSession:(DBSession *)session userId:(NSString *)userId;
In the deprecated iOS Sync SDK, you use DBFilesystem.initWithAccount: and supply the DBAccount you want to use, which you can get from your DBAccountManager.
DBFilesystem.initWithAccount:
DBAccount
DBAccountManager
Ok yes !