An updated version of our Geolocations sample app using Cloud Code.
In this sample app, we'll add a validation to ensure users cannot add more than one check-in post every minute, as well as a Cloud Function that allows us to calculate the average check-in location of a user, all in cloud!
- Clone the repository and open the Xcode project.
- Add your Parse application id and client key in
- Install the Parse command line tool by entering the command
curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bashin your terminal (Mac) or command prompt (Windows).
- From the root directory of the app, enter the command
parse newin your terminal or command prompt in order to setup the cloud code configuration files.
- You'll be prompted for your Parse username and password, and you'll also be shown a list of your Parse apps. Choose the one you want to associate with this project (you might want to create a new one).
parse deploy. This will deploy the Cloud Code for this app.