cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

API v2 - Longpoll Objective C

Explorer | Level 3

Hello,

 

I want a good example of a using ListFolderLongpoll, I am getting cursor errors and find little documentation as to how to receive changes notification.

 

I am using ObjC SDK V2.

 

 

2 Replies 2
Highlighted

Re: API v2 - Longpoll Objective C

Dropboxer
Dropboxer

Hi Raheel, you can find the documentation for listFolderLongpoll itself here.

 

Using it would look like this:

 

// cursor should be the Files.ListFolderResult.cursor as retrieved by the last call to listFolderContinue
DropboxClientsManager.authorizedClient?.files.listFolderLongpoll(cursor: cursor).response(completionHandler: { (result, error) in
    if ((result) != nil) {
        if (result?.changes)! {
            // There are changes, so call listFolderContinue to retrieve them
        } else {
            // listFolderLongpoll didn't report changes, so call listFolderLongpoll again
        }
    } else if ((error) != nil) {
        // Perform whatever error handling you want here
    }
})

 

Highlighted

Re: API v2 - Longpoll Objective C

Explorer | Level 3

Thanks Greg, I just figured that out. 

 

The new SDK is getting some used to.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?