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
Zoey03
7 years agoHelpful | Level 6
IOS build error: No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData
DBUserClient * client = [DBClientsManager authorizedClient ];
DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];
[[client.filesRoutes uploadData:objPath ...
- 7 years ago
Still I don't know why it encountered this error,,,
No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData:mode:autorename:clientModified:mute:inputData:'
DBUserClient * client = [DBClientsManager authorizedClient ]; DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite]; [[[client.filesRoutes uploadData:@"/test/path/in/Dropbox/account/my_output.txt" mode:mode autorename:@(YES) clientModified:nil mute:@(NO) inputData:fileData] setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) { if (result) { NSLog(@"%@\n", result); } else { NSLog(@"%@\n%@\n", routeError, networkError); } }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) { NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded); } ] ;
I compared the demo with these codes and they are the same. Really need help!
- 7 years ago
Zoey03 To clarify, did you solve this, or do you still need help? You marked your last reply as a solution.
Anyway, I recommend just letting Xcode autocomplete the method call, as that will give you the definition for the version of the SDK you have installed.
It sounds like you're referring to this sample, which is now out of date. (I'll ask the team to update that.) It's just missing the new propertyGroups parameter, to which you can pass nil if you're not using that feature. So, an updated version would look like:
NSData *fileData = [@"file data example" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO]; // For overriding on upload DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite]; [[[client.filesRoutes uploadData:@"/test/path/in/Dropbox/account/my_output.txt" mode:mode autorename:@(YES) clientModified:nil mute:@(NO) propertyGroups:nil inputData:fileData] setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) { if (result) { NSLog(@"%@\n", result); } else { NSLog(@"%@\n%@\n", routeError, networkError); } }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) { NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded); }];
Zoey03
Helpful | Level 6
Still I don't know why it encountered this error,,,
No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData:mode:autorename:clientModified:mute:inputData:'
DBUserClient * client = [DBClientsManager authorizedClient ]; DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite]; [[[client.filesRoutes uploadData:@"/test/path/in/Dropbox/account/my_output.txt" mode:mode autorename:@(YES) clientModified:nil mute:@(NO) inputData:fileData] setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) { if (result) { NSLog(@"%@\n", result); } else { NSLog(@"%@\n%@\n", routeError, networkError); } }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) { NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded); } ] ;
I compared the demo with these codes and they are the same. Really need help!
Greg-DB
7 years agoDropbox Staff
Zoey03 To clarify, did you solve this, or do you still need help? You marked your last reply as a solution.
Anyway, I recommend just letting Xcode autocomplete the method call, as that will give you the definition for the version of the SDK you have installed.
It sounds like you're referring to this sample, which is now out of date. (I'll ask the team to update that.) It's just missing the new propertyGroups parameter, to which you can pass nil if you're not using that feature. So, an updated version would look like:
NSData *fileData = [@"file data example" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO]; // For overriding on upload DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite]; [[[client.filesRoutes uploadData:@"/test/path/in/Dropbox/account/my_output.txt" mode:mode autorename:@(YES) clientModified:nil mute:@(NO) propertyGroups:nil inputData:fileData] setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) { if (result) { NSLog(@"%@\n", result); } else { NSLog(@"%@\n%@\n", routeError, networkError); } }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) { NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded); }];
- Zoey037 years agoHelpful | Level 6
Thanks a million!! It finally passed when I add that line of code.
yesterday I marked your reply as a solution by mistaken but I didn't know how to undo, while today it is truly solved!
- MarkStasak6 years agoExplorer | Level 4
Just updated a project to SDK 3.9.4 and got similar error messages from a slightly different cause. You may need to add strictConflict:@(NO) to certain methods like uploadData, in the same manner as propertyGroups:nil.
- iOSDev6 years agoNew member | Level 2
same code doesn't worked for me. same error i am getting
No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData:mode:autorename:clientModified:mute:propertyGroups:inputData:'
- Greg-DB6 years agoDropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/55934948/dropbox-error-in-uploaddatamodeautorenameclientmodifiedmutepropertygroup ]
iOSDev I see you also posted this on StackOverflow. I've answered there:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 3 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!