4 Minutes Read

Part 1: Getting started with Push Notifications in iOS

Whitepaper: Connected Worker Strategies to Embrace Social Distancing in the COVID-19 Era - Challenges and Opportunities
Download Now

Getting started with Push Notifications in iOS

This is the first part of the three part blog series of push notifications functionality in Apple devices that helps you in getting started with push notifications in iOS including the concepts of push notifications, its functionality,  its key takeaways and limitations. The second part of the blog series focuses on configuration aspects of push notifications, while the last part of the series talks about configuration aspects of push chat.


Push notifications enables your application to notify a user of new messages or events, even when the user is not actively using your application. On Android devices, when a device receives a push notification, your application’s icon along with a message shows up in the status bus. A push notification is a short message that consists of the device token, a payload and a few other bits and bytes.

Thus push notification technology is quite common for smart phone users, though there might be certain variations from application to application or from one phone model to another one.

Why do you need push notifications?

In iOS, apps have limited functionality to process everything in the background. Apps are only allowed to perform a limited set of activities to ensure that the battery life is conserved. However, in certain instances, when something intruiging happens and  you wish to let the user know about this, even if they are currently using your app, then how will you go about it?

To take care of such instances, Apple provided a solution, wherein instead of your app continuously checking for events or doing background processing, you can write a server-side component to do this instead.

This implies that when an interesting event occurs, the server-side component can send a push notification, which can do three things:

  • Display a short text message
  • Play a short sound
  • Set a number in a badge on the app’s icon

This blog lets you understand how to make a simple app that uses Apple push notification service (APNS). The first step to accomplish this is to configure your app to receive push notifications and test message.

How push notifications work? (A brief overview)

Getting push notifications to work on your app is a bit tedious and a challenging process, though you may ultimately relish and enjoy your fruits of labour.

It consists of a series of stages, which is outlined in the following figure:

Blog picture.png


  1. The app enables push notifications, wherein the user has to confirm whether he intends to receive these notifications or not.
  2. Upon confirmation, the app receives a “device token”. You can assume this device token as the address that push notifications will be sent to.
  3. The app sends the device token to your server.
  4. If an interesting event occurs in your app, the server sends a push notification to the APNS.
  5. APNS sends the push notification to the user’s device.


Once the user’s device receives the push notification, it displays an alert, plays a sound and/or updates the app’s icon. The user has the flexibility to launch the app from the alert itself; the app has the information of the push notification and can handle it as it sees appropriately. Now a question might arise in your mind? Do we still need push notifications in the age of local notifications and multitasking?

Local notifications have certain limitations, wherein they are solely meant to scheduling timed events and unlimited background processing in only available to apps that process VOIP, navigation and background audio. However, if you still want to notify the users about external events, while the app is closed, you still require push notifications.

Pre-requisites for configuring push notifications:

 To configure push notifications on your app, you need to ensure the following requirements:

  • An iPhone or an iPad: You need to test push notifications on your device, as they do not work in the simulator.
  • An iOS Developer Program membership: You have to make a new App ID and provisioning profile for each app that uses push and at the same time, make an SSL certificate for the server. You can accomplish this at the iOS provisioning portal.
  • A server that is connected to the internet: Since push notifications are always sent by a server, you need to have a server that is connected to the internet. For development, purpose, use your Mac as the server and for production use, you need virtual private server (VPS) like Linode.

How does a push notification look like?

Payload, which is part of a push notification is the most important aspect that we would be interested, as it consists of the actual data you will be sending across.

Your server should provide this payload as a JSON dictionary. The payload for a simple push message will be displayed like this:




                               "alert": "Hello, world!",

                               "sound": "default"



There are myriad ways to configure the JSON payload like you can change the sound that is played, provide a localized text and you can even insert your own fields. Push notifications are intended to be small with payload size not exceeding 256 bytes.

Some key limitations

  • Push notifications are not reliable:

There also seems to be a possibility that push notifications might not be actually delivered, even if the APNS server accepts them. You cannot track the status of the push notification, once you have sent it to APNS. The delivery time may also vary – from seconds to even up to half an hour.

There might be some other instances like the user’s iPhone may not be able to receive push notifications all the time. They could be on a WIFI network that does not allow connections to be made to APNS, since the required ports may be blocked or the phone could be switched off. APNS attempts to deliver the last notification it received for that device when it reverts online, but it will only try for a limited period. Once it times out, the push notification will be lost forever!

  • They can be an expensive proposition:

Incorporating push functionality to your app is fairly easy and inexpensive if you own the data; however, if you a lot of users or data you need to poll, it may become a costly proposition.

  • Requirement of a certificate for APNS

In order to enable push notifications in your app, it needs to be signed with a provisioning profile that is configured for push.  Apart from that, your server needs to sign its communications to APNS with an SSL certificate.

The second part of this blog series outlines the functionality and procedures for configuring the push notifications on your iPhone or an  iPad.

Request a Demo

If you would like to request a demo of Innovapptive's Native, HTML5 or Hybrid apps, please click on the link. Alternatively, if you would like to discuss with an Innovapptive solution expert, you can reach out to us by emailing us at sales@innovapptive.com or you can reach a sales representative at (713) 275-1804.

COVID-19, Manufacturing Skills Gap and the Connected Worker
By 2050, the world population is estimated to grow from 7.6B to 9.6B. This growing population will boost consumer demand across all industries. From...
Read More
How Life Sciences Can Keep Production Going in the COVID-19 Pandemic and Help Employees Stay Safe from Infection
Life Sciences has gotten a lot of bad press in recent years. However, if there ever was a time when the world needs life sciences companies and the...
Read More
COVID-19 Response: 7 Advantages of Mobile Technology for Preventative Maintenance Optimization
The COVID-19 pandemic has brought the world economy almost to a standstill as all non-essential industries are closed to prevent the spread of the...
Read More
Reconfigurable COVID-19 Public Health Regulatory Checklists, Policies & Inspections to Promote Workplace Safety
COVID-19 knows no borders; neither does your business. As the world shuts down or works from home, you struggle to keep up production, even with the...
Read More
Does Your Mine Use Syclo or SAP Work Manager? Consider Innovapptive and mWorkOrder
Mining is a complex industry. For one, it almost always operates in remote areas far from infrastructure. Mines are found in the sides of mountains,...
Read More
UNICEF Uses Mobile Warehouses to Increase Aid Efforts, Keep Workers Safe during the COVID-19 Pandemic
UNICEF (short for United Nations International Children’s Emergency Fund) has been on the forefront of many disasters and crises since its founding...
Read More
10 Key Leadership Practices Employed During a Very Large, Prolonged Crisis Response
While organizational leadership is always important, it is critical during a crisis. Crisis leadership often requires practices that differ markedly...
Read More
3 Reasons Utilities Using Syclo or SAP Work Manager Should Consider Innovapptive’s mWorkOrder
Utilities are a crucial industry. People will always need electricity, natural gas, water, wastewater treatment, telephone service, cable TV and...
Read More
5 Reasons Why Mobile Work Orders Should Replace Paper-Based Processes – Especially in a Coronavirus World
Change is the only constant in industrialized societies. For example, just a few short weeks ago, the coronavirus was a minor story, taking place in...
Work Orders
Read More