iOS SDK Querying Content - CM
PWCME SDK provides convenient methods that allow you to very easily search and filter for CME content. The primary classes for querying are
PWCMEQueryOperation. You can also leverage the convenience method on
PWCMEContainer to perform queries.
Constructing a Query
Constructing a query takes just a few steps.
1. Create an
2. Initialize your
PWCMEQuery object with the predicate.
3. Customize your query parameters (such as sorting and desired keys).
Executing a Query
There are two ways of executing a query.
Execute a query against a
Do not use this method when the number of returned records is potentially more than 100 records; for efficiency, all queries automatically limit the number of returned records based on current conditions. If your query hits the maximum value, this method returns only the first portion of the overall results. The number of returned records should be sufficient in most cases, but to get the entire set of records you must use a
PWCMEQueryOperationobject instead. Query operations also return a maximum number of results, but when they do, they provide a cursor object that you can use to fetch the next batch of results.
Execute a query using
Paging Query Responses
The results of your query may be larger than your current
resultsLimit. If this is the case, a
PWCMEQueryCursor object will be returned. You can use the cursor to initialize another
PWCMEQueryOperation to fetch additional records:
ON THIS PAGE