iOS 7 Development - Adding Push Notification To iOS Apps
4.1 (8 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,233 students enrolled

iOS 7 Development - Adding Push Notification To iOS Apps

This Course will guide you through all the necessary steps required to add Push Notification to your iOS Apps
4.1 (8 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,233 students enrolled
Created by Pankaj Chhikara
Last updated 5/2014
English [Auto]
Current price: $20.99 Original price: $29.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1 hour on-demand video
  • 2 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Learn About Push Notifications
  • Learn how to integrate Parse SDK into iOS
  • Learn how to setup an App on
  • Learn how to create SSL Certificate & provisioning Profile
  • Learn about NSNotificationCenter
Course content
Expand all 17 lectures 45:19
+ Introduction.
3 lectures 07:12

Push notifications are way for an application that isn’t running in the foreground to let its users know it has information for them. The information could be a message,calendar event, or new data on a remote server. They can display an alert message or they can badge the application icon. They can also play a sound when the alert or badge number is shown.

When users are notified that the application has a message, event, or other data for them, they can launch the application and see the details. They can also choose to ignore the notification, in which case the application is not activated.

Token Generation and Dispersal
when a application is installed on a device. The system receives the registration request from the application, connects with APNs, and forwards the request. APNs generates a device token using information contained in the unique device certificate. The device token contains an identifier of the device. It then encrypts the device token with a token key and returns it to the device

The device returns the device token to the requesting application as an NSData object. The application must then deliver the device token to its provider in either binary or hexadecimal format. and provider use this token to deliver push notification to the users.

The Notification Payload

Each push notification includes a payload. The payload contains information about how the system should alert the user as well as any custom data you provide. The maximum size allowed for a notification payload is 256 bytes; Apple Push Notification Service refuses any notification that exceeds this limit.

For each notification, compose a JSON dictionary object

Preview 03:21

Registering, and Handling Notifications

An application must register with Apple Push Notification service for the operating systems on a device to receive remote notifications sent by the application’s provider.

our app needs to register by calling the registerForRemoteNotificationTypes: method of UIApplication,

The parameter passed to this method specifies the initial types of notifications that the application want to receive. like Alert Badge, and sound.

Handling Remote Notifications

In iOS, you can determine whether an application is launched as a result of the user tapping the action button or whether the notification was delivered to the already-running application by examining the application state. In the delegate’s implementation of theapplication:didReceiveRemoteNotification: method, get the value of theapplicationState property and evaluate it. If the value is UIApplicationStateInactive, the user tapped the action button; if the value isUIApplicationStateActive, the application was front most when it received the notification.

Preview 02:38
+ Creating the SSL Certificate & Provisioning Profile
5 lectures 07:33
Generating a Certificate Request

Creating an App Id
Configure App Id for Development Push Notifications
Install App Id in Keychain
Creating & Installing the Provisioning Profile
+ Configuring & Adding Code
3 lectures 09:19
Update Storyboard
Configure Parse App

#import "AppDelegate.h"

#import <Parse/Parse.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions


[Parse setApplicationId:@"8M9bfH5d1pb3TEGKH54AdO6N9Wb9BQIR6uqEGRke"


[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];

[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound];

// Override point for customization after application launch.

return YES;


-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{


PFInstallation *currentInstallation =[PFInstallation currentInstallation];

[currentInstallation setDeviceTokenFromData:deviceToken];

[currentInstallation saveInBackground];


-(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{



-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{



Adding Code for a Push Enabled iOS Application
+ Sending Push Notification
1 lecture 01:42
Sending Push Notification from Parse website
+ NSNotificationCenter
2 lectures 09:07
What is NSNotificationCenter?

Post Notification



Add Observer

[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(remoteNotifications:) name:@"PushNotificationMessage"object:nil];


#import "MainTableViewController.h"

@interfaceMainTableViewController ()

@property(nonatomic,strong)NSMutableArray *tableData;


@implementation MainTableViewController

-(NSMutableArray *)tableData{

if (!_tableData) {

_tableData =[[NSMutableArrayalloc]init];




- (id)initWithStyle:(UITableViewStyle)style


self = [super initWithStyle:style];

if (self) {

// Custom initialization




- (void)viewDidLoad



// Uncomment the following line to preserve selection between presentations.

// self.clearsSelectionOnViewWillAppear = NO;

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.

// self.navigationItem.rightBarButtonItem = self.editButtonItem;

[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(remoteNotifications:) name:@"PushNotificationMessage"object:nil];


-(void)remoteNotifications:(NSNotification *)notifications{

NSString *msg =[[notifications.userInfovalueForKey:@"aps"]valueForKey:@"alert"];

[self.tableData addObject:msg];



- (void)didReceiveMemoryWarning



// Dispose of any resources that can be recreated.


#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView


// Return the number of sections.

return 1;


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section


// Return the number of rows in the section.



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath


static NSString *cellIdentifier =@"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];

// Configure the cell...


return cell;


Display Notification Message in UITableViewController
  • A mac running at least Mountain Lion OS X 10.8.4
  • Apple Developer Account
  • iOS Device(iPhone or iPad)

Using Push Notifications is a great way to add real-time messaging to your application. It allows you to stay in touch with your users and makes it possible for your users to communicate with each other. This course will guide you through all the necessary steps required to add this feature to your iOS Apps.

We will begin on the Apple Developer website to create an SSL Certificate associated to an App ID and a Provisioning Profile. Next we'll see how to configure a Parse App on the Parse website, and finally, we'll take a look at creating a push-enabled iOS application and sending notifications to users.

As a bonus, the course shows you how to use NSNotificationCenter to display Push Notification message in UITableViewController.

Why take this course ?

Setting up Push Notifications is often a source of frustration for developers. The process is complicated and invites problems to happen along the way.By the completion of this course, you will have developed the necessary skills required to be able to set up and implement Push Notifications in your iOS Apps.

Course Outline:

* What is Push Notification?

* Registering and Handling Notifications

* Getting to know Parse

* Creating the SSL Certificate & Provisioning Profile

* Sending Push Notifications

* NSNotificationCenter

By the completion of this computer based training course, you will be fully capable of Adding Push Notification from start to finish, including Creating App id and Provisioning Profile in the App Store.

Who this course is for:
  • People with basic knowledge of iOS development