cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iOS Obj-C Getting result.entires to be UItableview Datasource

iOS Obj-C Getting result.entires to be UItableview Datasource

mrobinson
Helpful | Level 6
Go to solution

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

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

mrobinson
Helpful | Level 6
Go to solution

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.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

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.

mrobinson
Helpful | Level 6
Go to solution

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-DB
Dropbox Staff
Go to solution
No, unfortunately we don't have anything pre-built like that.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    mrobinson Helpful | Level 6
What do Dropbox user levels mean?