-
Speed block when scanning multiple folders
Hello, For the latest version of our app, we changed the file format, and ever since doing so, Dropbox sync has slowed significantly. I'm wondering if there is anything I can do about this. Some background: - Our app uses a "file package" format - that is, each project created in the app creates a folder full of files and…
-
Dropbox API Bug: "Restricted Content" Error for Unrestricted Files
Hello, There seems to be an odd bug in the Dropbox API whereby if you try to download a plain text file containing nothing but a period, you receive a "Restricted Content" error and it refuses to download. One of our customers came across this after she had deleted content from a text file in our writing app but had left…
-
[Obj-C API 2] Dealing with DMCA errors?
Hello, We've had a couple of reports of users encountering a 461 Dropbox error. The publicly-shipping version of our app is using API 1, and looking this up, it seems to be a DMCA-related error - it seems to be that Dropbox throws this error when trying to sync certain DMCA-restricted files. A couple of questions on how…
-
Objective-C framework now failing to build?
Hello, If I download a fresh copy of the Objective-C API 2 framework and try to use it in an Xcode project, it refuses to build, reporting missing files. I do not have these problems with a version of the framework source code I downloaded a few weeks ago. To reproduce, using Xcode 8 on macOS 10.12: 1. Go to:…
-
Meta-data unreliable in DBFILESUploadSessionFinishBatchResultEntry?
Hello, I'm using chunked uploads to upload files (although this may affect regular uploads, too - I haven't checked that yet). I use the clientDate parameter of DBFILESCommitInfo to ensure the displayed date on Dropbox matches the displayed date in the local file system (a very welcome addition to API 2, thanks!), so that…
-
-uploadSessionFinishBatchCheck: - Getting path from errors
Great, thank you again. I now have most of this working with one thing I still haven't managed: - If DBFILESUploadSessionFinishBatchResultEntry results in -isFailure, how do I get the path the entry was trying to upload to? If there's a failure, I check the reasons and try re-uploading if possible. But in order to do that,…
-
How to re-link a user in API 2 (Handling Revoked Access Etc)
In API 1, I could offer the user an option to re-link (re-authorise) Dropbox if they run into issues because their access token had expired or been revoked. I could do this as follows: First, I listened for the DBSession delegate method: - (void)sessionDidReceiveAuthorizationFailure:(DBSession * )session userId:(NSString *…
-
Obj-C API-2 Equivalent of DBRequest networkRequestDelegate?
Hello, In API-1, I could easily set iOS's activity spinner going whenever Dropbox accessed the network like this: - (BOOL)application:(UIApplication * )application didFinishLaunchingWithOptions:(NSDictionary * )launchOptions { [DBRequest setNetworkRequestDelegate:self]; } // DBNetworkRequestDelegate - these delegate…
-
-uploadSessionStartUrl: example?
Apologies for the barrage of questions - it's only because I'm updating a large class to use API 2. Is there an example of how to use -uploadSessionStartUrl: anywhere? (A Google search brings up nothing but the documentation.) I use -uploadFileChunk: a lot in API 1, so need to replace this with -uploadSessionStartUrl: in…
-
Obj-C: Getting "over quota" error after session start for uploading chunks
Whenever an API call fails, I like to check to see if the user is over their usage quota, and if so, I throw up a warning that they need to delete some files or upgrade their Dropbox account. As Greg previously explained, I can do this using the route error passed into the response methods, e.g.: DBFILESUploadError…
-
Obj-C download destination + two questions on method names
Hello again, Three quick questions: 1. To download a file, I use -downloadUrl:overwrite:destination:. The documentation for the latter says: "A closure used to compute the destination, given the temporary file location and the response." What exactly does this mean in practice? More specifically: you set a destination URL…
-
Obj-C API 2: DBFILESWriteMode - using -initWithUpdate with file revs vs -initWithOverwrite:
In API 1, to overwite an existing file on the server, it was always necessary (as I understand it) to provide the file rev of the existing file. If you didn't do this, you would receive an error. Otherwise, you had to first delete the file and then write it again. (I could be wrong about this - maybe it was possible to…
-
How get app key in API 2?
In API 1, I could get the app key like this: NSString *cachedAppKey = ... MPOAuthCredentialConcreteStore *store = [[DBSession sharedSession] credentialStoreForUserId:nil]; if (cachedAppKey == nil || [cachedAppKey isEqualToString:store.consumerKey] == NO) { NSLog (@App key changed since last use!, nil); } Is there a way of…
-
Using file revs in API 2
In API 1, whenever a file was uploaded, a file rev was provided in the meta-data's .rev property in the "did upload" delegate methods. In API 2, DBFILESFileMetadata has an equivalent .rev property - so far, so good. But how do I use that file rev when uploading files? In API 1,…
-
Modification dates for directories?
In API 1, DBMetadata would report -clientMTime and -lastModifiedDate dates for any time of meta-data, including folders. In API 2, it seems that -clientModified and -serverModified are only available for DBFILESFileMetadata and not for DBFILESFolderMetadata. So how do I get the modification date for a folder? Thanks, Keith
-
Objective-C API 2 - dealing with error codes
Hello, In transitioning my API 1 Obj-C code over to API 2, I'm slightly confused over how to deal with certain error codes in API 2 - or even how to locate them properly. # 1. Create Folder Errors When creating a folder in API 1, if something went wrong, the delegate's -restClient:createFolderFailedWithError: method would…
-
Case-Sensitivity in API 2
Hi, Short version of this question: Is DBFILESMetadata's .pathDisplay property guaranteed to always use the correct case in its last path component, as .DBMetadata's .path property was in API 1? (Everything below is just a longer-winded way of asking that. :) ) I've always had an issue with the conflict between Dropbox…
-
Trying to find some Objective-C API 1 Functionality...
Hello, I'm starting to convert my Objective-C Core API 1 code to API 1 and am having a few problems finding equivalent functionality in some areas. Because there's no language-specific transition guide, the only way of trying to map things across is to go through the framework header files for a number of things, and there…