DEV Community

Cover image for How to set up iOS push notifications in SashiDo
Vesi Staneva for SashiDo.io

Posted on • Originally published at blog.sashido.io

How to set up iOS push notifications in SashiDo

Push notifications allow you to stay in touch with your users and make it possible for your users to communicate with each other. Before you begin, remember that push notifications are not available in the iOS Simulator. You will need an iOS device, as well as an Apple certificate to complete this tutorial.

Create your APNS (iOS) credentials

Creating your Apple Push Notification Service credentials is actually the longest part of this tutorial.

  1. Log in to the Apple Developer Member Center and click on Identifiers under iOS Apps and locate your application in the list.

  2. Click the + symbol and fill out the form. Make sure you tick off the Push Notifications checkbox.

  3. Select your App under the section Identifiers and click on it. Then click edit.

  4. Go to the section Push Notifications. Choose either the Development or Production certificate option and click Create Certificate.

  5. Follow the instructions in the Add iOS Certificate Assistant and click continue.

  6. Using the Certificate Signing request that was just created, generate the APNS Push SSL certificate.

  7. When the Download button appears, you can download your certificate(s). You may need to reload the page for this to update.

  8. Open the downloaded certificate with the Keychain Access app.

  9. You will see your certificate under My Certificates or Certificates.

  10. The final step is to export your certificate as a .p12 file. Select the certificate that was just added to the Keychain Access and select File -> Export Items... from the menu. When saving the file, use the Personal Information Exchange (.p12) format.

Ok, you’ve got your .p12 file :)

Configuring the SashiDo App

To send Push Notifications with SashiDo you will need to upload the certificate you created above.

Navigate to your SashiDo Dashboard, and click on App Settings, then Push. Click on Upload a file under Apple Push Certificates and locate the .p12 certificate.

Get the example app from SashiDo

Download or clone the example app from SashiDo repository on GitHub and change the your_application_id, your_client_key and api_end_point in AppDelegate.m file on line 22. It looks like this:

[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
        configuration.applicationId = @"your_application_id";
        configuration.clientKey = @"your_client_key";
        configuration.server = @"api_end_point";
}]];
Enter fullscreen mode Exit fullscreen mode

Build the example app on your iOS Device

This should be a trivial step but you can find more information in the official Apple guides.

Sending Push Notifications

Now it's time for you to send some test push notifications.
Navigate to your SashiDo Dashboard, and click on Push, then Send a push. For testing purposes, you can use the default Everyone audience to send a message to all of your registered devices regardless of the platform. Simply enter a message and click Send! You should see the notification appearing within a few seconds on your device.

For more information on advanced push targeting techniques, you can see the Parse Push Notifications for iOS and OS X Guide

That's it! Now you can use the power of push notification in your App :)

Top comments (1)

Collapse
 
miqueasgutierrez profile image
miqueasgutierrez

Also an easy way to integrate Push notifications, is by integrating INDIGITALL, it has been developed with the latest technology to guarantee maximum effectiveness and simplify the process of creating and sending Notifications with animated image, Segmented, Geolocated and many other functions, it is great.

Here you can see the easy installation for your Ios platform:docs.indigitall.com/en/indigitalls...