Interactive Push Notifications for iOS 8

In IOS8 Now providing interaction of notification like Skype giving option like reply button that type of intractive button you can set into our own application.

For,That you need to register all possible notifications “categories”.

Now question is what is categories for “Interactive push notification”?
A category is defined by a set of actions. and i will demonstrate here how to create category for “Delete” and “Replay” Button into Notification.

Here is some example how looks notification.


Below is image show how we are going to implement.
Screen Shot 2015-05-11 at 11.33.47 am

Each action is shown to the user as a button. Actions have two possible activation modes: foreground or background. If your app can perform the action with no further interaction from the user then you want to use the background activation mode. If the action needs further user input then you can set the activation mode to foreground to have your app launched when actioned, for example, presenting a keyboard in your app when they reply button is tapped.

Note the string identifiers used above. These are used later on in order to setup and respond to a selected action. In a real app it would be recommended to not write the identifiers more than once, instead define them in a single place.

Now with the delete reply category setup, we need to get the user’s permission to allow these types of notifications. This will show the “App would like to send you notifications” alert box.

Here, I Schedule one local notification for identify the properly work or not.

After schedule your notification app running into simulator or real device it show below image and press on “Ok” so you can able getting notification.
Screen Shot 2015-05-11 at 11.36.13 am

When the user selects an option we get a callback to the app delegate.

This same also works with APNS. Your notification payload can specify the category identifier, and you can get a callback with another delegate.

Also you can download the sample code for here.

This entry was posted in iPhone Development by Nimit Parekh. Bookmark the permalink.

About Nimit Parekh

Hey ! I am Nimit S. Parekh a passionate mobile application developer from India.. I am always hunting for better knowledge in iOS. I am looking forward to be a good app & game developer. I keep on sharing my knowledge @ as soon as I get spare time for it. I would love to hear your personal feedback about this blog.

Leave a Reply

Your email address will not be published. Required fields are marked *