Function: Search contentApps

The result depends on whether a user is registered for private contentApps.

  • If a user is logged in, then a search is performed in both private and public contentApps at the same time.
  • If not logged in, then only in public contentApps are searched.

Example to search a contentApp
/* 
Parameters "from" and "to": 
Number of projects to be loaded from your contentDock account. 
If you want to display 10 projects per list page, then: 
For the first page: from: 0, to: 10
For the second page: from: 11, to: 20
...

Parameter "search": The search term from the search form is passed here.
Parameter "categoriesIds": The selected categories from the search form are passed here. 
*/
CDockSDK.getSearchProjects(from: 0, to: 100, search: searchString, categoriesIds: arrCategoriesIds, blockOnComplete: { [weak self] arr in
    // As result you get an array with ProjectModel objects
    if let arrProjects = arr as? [ProjectModel] {
        // Your individual function
        // ...
    }
})

More information


Feedback or Questions

We are always happy to help you with questions about the code or other questions.

Was this page helpful? Yes No

Topics on this page