Create IOS Applications Using Parse and Swift

Learn how to use Parse with Xcode and Swift
4.9 (27 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
629 students enrolled
$19
$20
5% off
Take This Course
  • Lectures 43
  • Length 4 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 1/2015 English

Course Description

Want to take your Application to the next level?

Want to improve your current project ?

Want to add Online Database to your Application?

Want to write the code to send and receive Remote Push Notifications?

Want to add In-App Purchases the easiest way?

Thinking in the future to create an amazing application that will contain any of these?

If YES then this course is for you!

What's the course about and how is it structured?

In this course we will learn how to Create a Parse application and connect it to our IOS Application using IOS 8, Xcode 6 and Swift with a step by step approach.

We explain what you need in order to create online databases, users, remote push notifications, in-app purchases and more.

The course covers :

Creation of our Parse account.

Download of Parse SDK's

Connect Parse application with our IOS application

Save - Update - Delete PFObjects

Retreive PFObjects using ID

Create Queries to search Classes

Create Predicates to use constraints to our search

Create advanced Queries

Caching data if no active Internet connection

Understant fetching in background

User creation

Login and logout a user

Reset a forgotten password

Setup and use Remote Push Notifications

Pass and read data in a Remote Push Notification

Setup In-App Purcahses

Write the code to use an In-App Purchases

Tips and tricks fro the best User Experience

Example applications

Materials

The course consists of :

4 hours + video lectures with code from scratch

application files for download

This course can be completed in a couple of days.

Why to follow this course?

If you want to add online databases, add users to your application, add remote push notifications, create in-app purchases the easiest way this course is for you!

Using Parse to your project will take your application to the next level.

Who can follow this course ?

Anyone with basic knowledge of programming can follow this course.

This course is updated for Swift 1.2 and Parse 1.7.5 and under development for Swift 2.0 and Parse 1.8.2

Copyright © Valsamis Elmaliotis 2014-2015

What are the requirements?

  • A Mac
  • An Apple Developer license is required for sending push notifications and use In-App Purchases

What am I going to get from this course?

  • Create a Parse application and connected it with an IOS application
  • Create - Update- Delete PFObjects
  • Create Queries to search Classes
  • Caching Data if no Active Internet Connection
  • Use Remote Push Notifications
  • Create users
  • LogIn - LogOut
  • Reset a forgotten password
  • Query the user Class
  • Setup Remote Notifications
  • Send Remote Notifications from Parse
  • Send Remote Notifications programmatically
  • Send and access Remote Notification data
  • Setup In-App Purchases
  • Create the code for In-App Purchases using Parse
  • Tips and Tricks for the best User experience
  • Example applications to understand the lectures better

What is the target audience?

  • This course is meant for students that have a basic knowledge of Xcode and swift

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
Important read me
Preview
Article
00:48

About the Course

Who am I?
Article
02:15

In this lecture we download Xcode from Apple website

Important Read Me Information
Article
Section 2: Swift
Variables
Preview
05:02
Comments
01:20
Statements (if - for - while - switch)
05:45
Strings
03:30
Arrays
05:03
Dictionaries
04:07
Functions
03:20
Classes
03:55
Section 3: Parse
03:08

In this lecture we create a Parse account and download Parse SDK's

Website : parse.com

Steps:

- Create an account

-Scroll down the page and select Downloads

-Download IOS SDK's

-Create a new Parse Application

06:05

In this lecture we connect our Parse application with our IOS application

Steps:

-Drag the Parse SDK's to Xcode project

-Add all the necessary Frameworks

-Create a new obj c file

-Create a bridging header

-Import Parse header to .h file

-In AppDelegate swift life connect using Parse AppicationID and ClientKey

Section 4: PFObject
06:42

In this lecture we will learn to save rows to our Class

Steps:

-Create a new Class name Test

-Create 2 columns with names name, age

-Create a new row filling these columns (objectId and createdAt columns automatically created by Parse)

-Create a new column and a row programmatically

-Drop a Class

03:27

In this lecture we learn the difference between save and saveInBackground

Explanation:

.save()

using .save() will cause the block of code to wait the save action to be completed and then execute the code under the .save() function

.saveInBackgroundWithBlock{}

using .saveInBackgroundWithBlock{} will cause the block of code to be executed immediately and the save action to be executed in the background



.saveInBackgroundWithBlock{} has 2 variables: success and error

these variables automatically updated when the action is completed

if the save action was successful the success = true and error = nil

04:41

In this lecture we learn how to retrieve an object using ID

Explanation:

.getObjectInBackgroundWithId{} will search the Class we specify using the objectId we provide, and return the specific row.


.getObjectInBackgroundWithId{} has 2 variables object and error that updated automatically when the action is completed

if get action was success the object = the specific row and error = nil

We can rwad the returned row using object["the column we want"] as "the type the column is"

03:39

In this lecture we learn how to update a row

Explanation:

To update a specific row first we need to use a PFQuery to search the class and find the row we want to update.

After we find the row we want to update we use the variable object as:

object["column we want to update"] = "value we want to be updated"

and save it using object.save()

03:12

In this lecture we learn how to delete a row

Explanation:

To deletea specific row first we need to use a PFQuery to search the class and find the row we want to delete.

After we find the row we want to deletewe use the variable object as:

object.deleteInBackgroundWithBlock{}

06:30

In this lecture we learn how to save different data types

Data types we use:

-Bool

-Date

-Array

-File

Section 5: Queries
07:15

In this lecture we learn how to create a basic Query

Explanation:

query code:

-var query = PFQuery("class we want to search")

-var objects = query.findObjects()

we use findObjects to search the class and save the results to a variable objetcs

-for object in objects {

}

we loop through results and variable object is the current row we find

-let theName = object.valueForKey("the column we want") as "the data type of the column"

we save into variable theName the value of the column we choose from the current row

If we want to limit our results we use query.whereKey()

in whereKey we can add some constraints to limit our results

we can use many whereKey functions to add more constraints

04:05

in this lecture we learn how to use Predicates

Explanation:

Predicates is another way to limit your query results.

Instead of using whereKey you can use a predicate to add constraints.

Predicate code is similar to SQL code.

You have in a query a predicate and whereKey functions

06:25

In this lecture we learn to use "orQueryWithSubqueries" function

Explanation:

We use .orQueryWithSubqueries() to combine 2 or more queries in one to limit our results.

We create each query with the constraint we want and we use .orQueryWithSubqueries([Array with queries we want to add])

04:22

In this lecture we learn how to use findObjectsInBackgroundWithBlock

Explanation:

.findObjects()

using .findObjects() will cause the block of code to wait the find action to be completed and then execute the code under the .findObjects() function

.findObjectsInBackgroundWithBlock{}

using .findObjectsInBackgroundWithBlock{} will cause the block of code to be executed immediately and the find action to be executed in the background

.findObjectsInBackgroundWithBlock{} has 2 variables: objects and error

these variables automatically updated when the action is completed

if the find action was successful the objects = the result rows and error = nil

19:59

Example app 1

Section 6: Users
05:37

In this lecture we learn how to create a PFUser

Explanation:

-var user = PFUser()

We create PFUser variable

-user.username = "the username the user provide"

-user.password = "the password the user provide"

-user.signUpInBackgroundWithBlock{}

The function witch create a row to the Parse User class

.signUpInBackgroundWithBlock{} function has 2 variables succeeded and error

If the sign up action was successful the succeeded = true and error = nil

05:59

In this lecture we learn how to LogIn and LogOut

Explanation:

Log in:

-PFUser.logInWithUsernameInBackground("the username", "the password") {}

We use .logInWithUsernameInBackground(){} to log the user in.

In .logInWithUsernameInBackground(){} we need to provide 2 variables, the username and the password

The .logInWithUsernameInBackground(){} function has 2 variables user and error

If the log in was successful the user = the logged in PFUser and error = nil

Log out:

- PFUser.logOut()

We use .logOut function to log out the current logged in user

06:19

In this lecture we learn how to reset a forgotten password

Explanation:

-PFUser.requestPasswordResetForEmail("the email we want to reset password")

When the user use this function , he will receive an email from Parse that contain all the information to reset his password

06:14

In this lecture we learn how to search the User Class

Explanation:

-var query = PFUser.query()

We use this function if we want to search the User class

-var objects = query.findObjects()

We search the User class with .findObjects()

-for object in objects {

}

We loop through the results we find

-let theName = object.username

We retrieve the username using object.username (username is a special User Column)

-let theAge = object.valueForKey("the non special column we want") as "the column data type"

We can also search the User class using

var query = PFQuery(className: "_User")

Example App in Users (part 1)
16:16
Example App in Users (part 2)
11:42
Download Xcode Files
Article
Section 7: Remote Notifications
12:50

In this lecture we start our Remote Notification setup

We setup Identifier, provisioning profile, parse push page step by step

09:43

In this lecture we continue our Remote Notification setup

Steps:

In appDelegate.swift file

-Register our application notification types

-Create 4 functions

1) didRegisterUserNotificationSettings

Here we register our application for Remote Notifications

2) didRegisterForRemoteNotificationsWithDeviceToken

Here we update the Parse class Installation with the device ID

3) didFailToRegisterForRemoteNotificationsWithError

This function is called if a register error occur

4) didReceiveRemoteNotifications

Here we write the code to be executed when we receive a Remote Notification

-In login and Signin buttons we add a column to the Parse Installation Class with the current logged in user

05:00

In this lecture we learn how to send Push Notification from the Parse Website

Also how to create Channels in the Installation Class

08:00

In this lecture we learn how to send Remote Push Notification programatically

Explanation:

To send a Remote Push Notification to a specific user first we need to search the User class and find the user we want, then search the Installation class with user column the user we found before. Last we create a PFPush variable, set the attributes and send our Notification.

Code:

-var uQuery = PFUser.query()

-uQuery.whereKey("the column we want" equalTo: "the value we want")

-var iQuery = PFInstallationQuery()

-iQuery.whereKey("user" matchesQuery: uQuery)

-var push = PFPush()

-push.setQuery(iQuery)

-push.setMessage("the message we want to send with our notification")

-push.sendPush(nil)

11:40

In this lecture we learn how to send data with our Remote Notification and how we can access them

Explanation:

To send data within our Notification we need to create an NSDictionary variable

-var pushData:NSDictionary = NSDictionary(objectsAndKeys: "the objects and keys we want")

To add the message we need: "the message","alert"

To add another data: "the value","the key name"

Import our data to the PFPush variable

- var push.setData(pushData)

To read the data we write our code in the appDelegate.swift file in the didReceiveRemoteNotification function

-var payload:NSDictionary = userInfo

We recast the userInfo variable to an NSDictionary data type so we can use .ObjectForKey() function

-let theType = payload.objectForKey("the data key we want to read") as "the data type of the key"

Section 8: In-App Purchases
05:25

In this lecture we do the iTunes Connect setup

We create a non-consumable in-app purchase

07:08

In this lecture we write the code for our in-app purchase

Steps:

-Create a new column in Parse User Class with name adpro

-In the appDelegate.swift file in the didFinishLaunchingWithOptions function we create a PFPurchase observer

PFPurchase.addObserverForProduct("the product id from iTunes connect", block: {})

Inside the block we update the adaptor column to "yes"

-We add a new button to our project and in the click code we promote the user to buy our product

PFPurchase.buyProduct("the product id from iTunes connect", block: {})

Inside the block you write the code you want depend on what your in-app purchase provide.

-We Test our in-app purchase

To test our in-app purchase we need to login to our IOS device with a sandbox tester

Section 9: Extra
Caching Data if no Active Internet Connection
02:25
Section 10: Conclusion
Article

Conclusion

Swift 2.0 and Parse 1.8.2 Changes
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

I'm Valsamis Elmaliotis, i live in Greece and i am 30 years old. I'm an iOS developer that has been focused on mobile app design and creation for over 2 years. Since child i loved computers and programming. I started developing in Delphi for Windows applications. In my first company as developer we developed logistics software. After that i asked to develop 4 websites so i start learning PHP - CSS - MySql. When i bought my first iPhone i loved IOS, so i said to my self i should start developing for this platform, and that is how i began!

Since now i have 7 applications in the App Strore and i develop one more right now. Since the announcement of the new Swift programming language by Apple, I have buried myself in the Apple documentation and any online resource that is available. After some time i had the experience to update my projects from Obj C to Swift, and now i will teach you some stuff with Xcode and Swift so you can make amazing applications and have fun!

Happy Coding!

Ready to start learning?
Take This Course