I went through the ios sdk on github. But didn't understand the following parameters:
retrieveAndRank.searchAndRank( withCollectionName: collectionName, fromSolrClusterID: cluster.solrClusterID, rankerID: ranker.rankerID, query: "your-query-here", returnFields: "your-return-fields-here", failure: failure) { response in print(response) }