We Want to Hear From You! What Do You Want to See on the Community? Tell us 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
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.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
DBSession
with 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 theDBAccount
you 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.6,036 PostsLatest Activity: 11 hours ago
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 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!