Hello,
I am not very familiar with Dropbox API, though I got version 1 working just fine on my app. But I am not really following the path from V1 to V2 all that well.
I am attempting to do some very simple things, but find this new API ****** to digest I thought I would ask.
App Delegate Code went from this:
DBSession *dbSession = [[DBSession alloc]
initWithAppKey:@my key
appSecret:@my secret
root:kDBRootAppFolder]; // either kDBRootAppFolder or kDBRootDropbox
[DBSession setSharedSession:dbSession];
To This:
[DropboxClientsManager setupWithAppKey:@my key];
Initially I did the following:
if ([[DBSession sharedSession] isLinked]) {
[self.restClient loadMetadata:@/];
}
I replaced with this:
if([DropboxClientsManager authorizedClient] != nil ) {
[[client.filesRoutes getMetadata:@/]response:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) {}
I am not sure if I missed anything, but I can't seem to get back from that, it it always thinks it's not approved in the ios simulator.
My original calls are this:
[restClient loadMetadata"/"];
[restClient uploadFile:fileName toPath:destDir withParentRev:rev fromPath:path];
[restClient loadFile"" into:localpath];
However after the first link, it doesn't seem to stick...