Currently I'm integrating the dropbox API to my app following the tutorial. All works fine but I'm struggeling with the progress update. Here is the sample code from the tutorial:
NSData *fileData = [@"file data example" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
[[[client.filesRoutes uploadData:@"/test/path/in/Dropbox/account" inputData:fileData]
setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *error) {
if (result) {
NSLog(@"%@\n", result);
} else {
NSLog(@"%@\n%@\n", routeError, error);
}
}] progress:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) {
NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
}];
In the example code the progress handler is passed as an argument. I've never did this before and don't know how to get this code running (I'm a beginner in obj-C - sorry!). Currently I'm just uncommenting the argument and the code works fine but what to do to get the progress information?
Sorry if my question is trivial, but I'm bit lost ... Would be nice if someone can help me or point me in the right direction! THANKS!