iOS
Querying with NSPredicate
11 min
querying with nspredicate introduction in this section you will learn how to use nspredicate to define your queries in objective c at any time, you can access the complete project built with this tutorial at our github repository prerequisites in this tutorial we will use a basic app created in objective c with xcode 9 1 and ios 11 to complete this tutorial, you need an app created at back4app note follow the new parse app tutorial to learn how to create an app at back4app xcode basic ios app note if you don’t have a basic app created you can open xcode and hit file > new > project > ios then select app after you create your basic app you are ready to follow this guide note parse ios sdk works with ios 7 0 or higher 1 get the template download the template at back4app’s github repository , and unzip files in your project folder you can do that using the following command line 2 open the project template open xcode click on file >open file >open 3\ navigate to the project folder and double click on quickstartobjcexampleapp xcworkspace quickstartobjcexampleapp xcworkspace 4\ wait for xcode to open the project 3 understandig the difference usually for objective c you have two options for building queries using the ‘pfquery’ or the ‘nspredicate’ both work similarly but depending on how many constraints you want to use, it might make more sense using one instead of the other for instance, a simple query using pfquery would be but a more complex query could become so, depending on each case, you can choose to use ‘nspredicate’ instead a simple query using ‘nspredicate’ would be while a more complex query could become 4 executing your query you can, then, execute your query next steps at this point, you have learned how to get started with ios apps learn more by walking around our ios tutorials or check parse open source documentation for ios sdk