iOS
Install Parse SDK (ObjC)
17 min
install parse sdk on your ios objective c project introduction in this section you will learn how to install parse ios sdk into your xcode project 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 install sdk follow this step if you havenât yet installed parse ios sdk xcode can use cocoapods as dependency manager for swift and objective c cocoa projects you can refer to cocoapods getting started guide for additional details to install cocoapods, open your terminal, copy the following code snippet and paste it in to your terminal and hit return cocoapods should install automatically after you enter your password if thereâs a problem you may need to upgrade your local version of ruby next open up the xcode project folder and open a terminal window in that folder now you are going to create a podfile copy the following code snippet and paste it in to your terminal and hit return if your folder now shows your podfile you did it correctly be careful, if you donât see the podfile make sure your terminal is actually inside the project folder next open your podfile with xcode or any text editor and under each target add âpod âparseââ now you are going to add parse to your project make sure your terminal is opened to your project folder copy the following code snippet and paste it in to your terminal and hit return cocoapods will rebuild the project as a workspace and your project will now look like this if you have already opened your xcode project close it from now on youâll open the workspace file instead of the project file double click on the workspace file to open it congratulations! you have now installed the parse ios sdk 2 connect your parse app open your projectâs appdelegate swift file to set up the appâs credentials parse ios sdk uses these settings to connect to the back4app servers at the top of the file you should see a function called âdidfinishlaunchingwithoptionsâ paste the following code snippet inside this function, and make sure it is above the line that says âreturn trueâ at the top of your appdelegate m file make sure to include parse as a module by including the follwing code snippet right below â#import âappdelegate hââ your appdelegate m file should now look like this be careful , if xcode tells you there is no such module âparseâ thereâs an easy solution in xcode open âtarget > build settings > search paths > framework search pathsâ and then add two values â$(project dir)â and â$(inherited)â xcode will now be able to find your parse module go to your app dashboard at back4app website navigate to appâs settings click on features features > core settings core settings block> server server return to your appdelegate m appdelegate m file and paste your applicationid applicationid and clientkey clientkey see more at our new parse app guide 3 test your connection open your appdelgate m file inside the function called âdidfinishlaunchingwithoptionsâ add a snippet of code below the code that configures parse then add a snippet of code to appdelegate m file just below âdidfinishlaunchingwithoptionsâto create a new parse installation object upon your app loading your finished appdelegate m file should look like this build your app in a device or simulator ( command command + r r ) 2\ wait until the main screen appears 3\ login at back4app website 4\ find your app and click on dashboard dashboard 5\ click on core core 6\ go to browser browser if everything works properly, you should find a class named installation installation as follows next steps at this point, you have learned how to get started with ios apps you are now ready to explore parse server core features https //www back4app com/product/parse server and back4app add ons https //www back4app com/product/addons learn more by walking around our ios tutorials or check parse open source documentation for ios sdk