We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Crypto C.
11 years agoNew member | Level 1
Multi-User IOS
you can manage (store) multiple users dropbox in ios? and if so, how?
thanks
4 Replies
Replies have been turned off for this discussion
- Greg-DB11 years ago
Dropbox Community Moderator
Yes, this is certainly possible. In the official Dropbox iOS SDKs, for example, you can use the
linkFromControllermethod 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.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.
- Crypto C.11 years agoNew member | Level 1
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 !!
- Greg-DB11 years ago
Dropbox Community Moderator
In the iOS Core SDK, when you have a
DBSessionwith more than one account linked to it, you specify the user ID for the account you want to use when you construct aDBRestClient, using:- (id)initWithSession:(DBSession *)session userId:(NSString *)userId;In the deprecated iOS Sync SDK, you use
DBFilesystem.initWithAccount:and supply theDBAccountyou want to use, which you can get from yourDBAccountManager. - Crypto C.11 years agoNew member | Level 1
Ok yes !
thanks
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!