nextPageAsync method missing from Blog entry: Feature #17

Hi Guys,
Im building data collection paging into my app right now. The sync method works great, following the instructions found on: https://backendless.com/feature-17-data-paging-or-how-to-efficiently-load-large-data-sets-in-a-mobile-app/
However, what I need is to have the happen in aSync. Problem is that in the example the method ‘self.getPageAsync(restaurants, offset:offset, startTime:startTime)’ is missing from the example:

func advancedPagingAsync() {

    var startTime = NSDate()

    var offset = 0
    var query = BackendlessDataQuery()
    query.queryOptions.pageSize = PAGESIZE // set page size
    backendless.persistenceService.of(Restaurant.ofClass()).find(
        query,
        response: { (var restaurants : BackendlessCollection!) -> () in
            println("Total restaurants in the Backendless starage - \(restaurants.totalObjects)")
            self.getPageAsync(restaurants, offset:offset, startTime:startTime)
        },
        error: { (var fault : Fault!) -> () in
            println("Server reported an error: \(fault)")
        }
    )
} 

}

Can you let me know how to implement this?

This is my current implementation, but the UI gets stuck because it isn’t async:


let dataStore = backendless.data.of(BLProjectObject.ofClass())
        
        dataStore.find(
            query,
            response: {(bc : BackendlessCollection!) -> () in
                
                let totalObjects = bc.totalObjects
                print ("total objects to be added to the queue: \(totalObjects)")
                
                var size = bc.getCurrentPage().count
                while size > 0 {
                    // Get ProjectObjects
                    let blProjectObjects = bc.getCurrentPage() as! [BLProjectObject]
                
                    // Import Object Types
                    for blProjectObject in blProjectObjects {
                        self.addToDownloadQueue(blProjectObject)
                    }
                    
                    bc.nextPage()
                    size = bc.getCurrentPage().count
                }
            },
            error: { (fault : Fault!) -> () in
                print("queueAllAvailableBLProjectObjects: Server reported an error (ASYNC): \(fault)")
        })

The complete example is here (as all the examples for cookbook): https://github.com/Backendless/BlogFeatureDay-iOS/tree/master/F17DataPaging/F17DataPagingSwift

Thanks a lot Mark!