User ID in DropBox SDK

How can I find the user ID of the current user who connected through the Xcode In DropBox SDK. I need to do this programmatically.

+4
source share
2 answers

In your code, after you contacted, you can add:

[self.restClient loadAccountInfo]; 

and delegate:

 - (void)restClient:(DBRestClient*)client loadedAccountInfo:(DBAccountInfo*)info { NSLog(@"UserID: %@ %@", [info displayName], [info userId]); } 
+19
source

After you have contacted dropbox, you can try the following code:

 NSString* dropbox_id=[[DBSession sharedSession].userIds objectAtIndex:0]; 
0
source

Source: https://habr.com/ru/post/1347090/


All Articles