You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
mrobinson
8 years agoHelpful | Level 6
iOS Obj-C Getting result.entires to be UItableview Datasource
Hello,
i'm new to v2 and I'm updating an app using objective-c.
When I call a listFolder, I get results.
[[client.filesRoutes listFolder:searchPath] setResponseBlock:^(DBFILESListFolderResult *result, DBFILESListFolderError *routeError, DBRequestError *error) { if (result) { NSLog(@"result.entries %@.",result.entries);
result.entries = "{\n id = \"id:TT-P7bAf8VEAAAAAAAC6Xw\";\n name = 7777;\n \"path_display\" = \"/Sites/7777\";\n \"path_lower\" = \"/sites/7777\";\n}",
However I need to get this data over to a UItableview controller. Where the results.entries would be placed in:
NSDictionary *item = [results.entries objectAtIndex:indexPath.row];
I'm looking for way to get results.entries to a usable format.
Thanks,
Michael
Thanks for the response, I was able to build without a problem, I was looking to find out if you had a plug and play ready to go.
- Greg-DBDropbox Staff
Hi Michael, it looks like the Dropbox part of this is working correctly. The result.entries value is an NSArray of DBFILESMetadata, which you can use however you like in your app.
For example, you can iterate over that to get the name or pathDisplay of each item, and use those values to construct the UITableViewCells. The use of UITableView and UITableViewCell themselves are outside the scope of Dropbox API support though, so you may be better suited by checking the UITableView documentation or on an Apple forum for information on how to use those.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,909 PostsLatest Activity: 2 hours agoIf 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!