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: 

Re: Creating a folder that already exists (iOS)

Creating a folder that already exists (iOS)

Robert S.138
Helpful | Level 7
Go to solution

I went through this already for Android, and I learned that to create a folder that might already exists I only need to check the exception as follows:

catch (CreateFolderErrorException err) {
if( ! (err.errorValue.isPath() && err.errorValue.getPathValue().isConflict()) )
{ /* a real error, to be handled */ }
else  {/*this exception can safely be ignored*/}

Now I need to do the same thing in the Objective-C SDK for iOS.  In the completion block for createFolder I get:

^(DBFILESFolderMetadata *result, DBFILESCreateFolderError *cfError, DBError *error)

What is the equivalent check using "result", "cfError", and "error"?

 

10 Replies 10

Robert S.138
Helpful | Level 7
Go to solution

That fixed it.  Now just one import replaces all the other Dropbox imports I was using.

Need more support?