# Push Notifications Tutorial: Getting Started

**URL:** <https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531>\
**Category:** 🎓 Courses & Articles\
**Created:** [June 5, 2017, 1:00pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531 "2017-06-05T13:00:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jozsef.vesza](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jozsef.vesza/32/103514_2.png) [@jozsef.vesza](https://forums.kodeco.com/u/jozsef.vesza)\
**Post date:** [June 5, 2017, 1:00pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/1 "2017-06-05T13:00:57Z")

</div>

In this push notifications tutorial you'll learn how to notify your users and perform small tasks even when they aren’t actively using your app!

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/584-push-notifications-tutorial-getting-started](https://www.raywenderlich.com/584-push-notifications-tutorial-getting-started)

---

<div class="post-metadata">

**Author:** ![bhavukjain1](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bhavukjain1/32/69032_2.png) [@bhavukjain1](https://forums.kodeco.com/u/bhavukjain1)\
**Post date:** [June 5, 2017, 4:25pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/2 "2017-06-05T16:25:56Z")

</div>

Is there any particular reason for using certificates instead of APNS Auth Keys which is recently released by Apple? A single auth key works for multiple apps and it never expires.

---

<div class="post-metadata">

**Author:** ![b-bean](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@b-bean](https://forums.kodeco.com/u/b-bean)\
**Post date:** [June 22, 2017, 6:19am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/3 "2017-06-22T06:19:35Z")

</div>

Depends on the service you are using to generate the push notification. Looks like Pusher only supports certificates at the moment. As keys are a new feature it may take some time for third party providers to adopt them.

---

<div class="post-metadata">

**Author:** ![basementjack](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/basementjack/32/68880_2.png) [@basementjack](https://forums.kodeco.com/u/basementjack)\
**Post date:** [June 28, 2017, 1:24am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/4 "2017-06-28T01:24:52Z")

</div>

Hi, I followed along with the tutoral until the section telling me to use Pusher.  
The word Pusher is bolded, but is not a hyperlink.  
I didn’t see pusher on my mac, so I’m assuming it’s not part of xcode,  
I checked the app store but did not see it.  
There’s a pusher service, but that doesn’t appear to have the app.

Also if anyone is part of a corporate developer program, I had some questions around that -  
The instructions in the tutorial tell us to go to the developer portal to get a certificate.  
In xcode (8.3.3) under Project-\>General-\>Signing, I have “Automatically manage signing” checked.  
In the apple developer portal website, the option to edit any of my settings is grayed out (this could be a permissions issue, it’s my first time using this)

I’m not sure about others, but I know I could use a bit more detail in the tutorial around this area of how to send the notification to Apple, especially tips related to hot to send a message to APNS from a web server. Otherwise the article’s been great so far!

---

<div class="post-metadata">

**Author:** ![jozsef.vesza](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jozsef.vesza/32/103514_2.png) [@jozsef.vesza](https://forums.kodeco.com/u/jozsef.vesza)\
**Post date:** [June 28, 2017, 6:51am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/5 "2017-06-28T06:51:51Z")

</div>

Pusher link is at the end of the sentence, you can get it here: [GitHub - noodlewerk/NWPusher: OS X and iOS application and framework to play with the Apple Push Notification service (APNs)](https://github.com/noodlewerk/NWPusher)

As for the code signing, I understand the confusion (it _is_ a confusing topic), but our goal was to focus on push notifications. You can check your role in Xcode settings: if your role is Member, you won’t be able to edit these settings, and you’ll need to talk to someone with higher privileges.

 ![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/c/4/c4faeb7a619eabfd188f01ea88d7e6f5726a0abc.png)

---

<div class="post-metadata">

**Author:** ![basementjack](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/basementjack/32/68880_2.png) [@basementjack](https://forums.kodeco.com/u/basementjack)\
**Post date:** [June 28, 2017, 3:10pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/6 "2017-06-28T15:10:33Z")

</div>

Excellent! thanks for the clarification!

I was just a ‘member’ so I’ve reached out to someone at work and will get it changed.

I also appreciate the link to the pusher tool!

I still don’t see the link to it the article, is the most current version of the article posted?

-Jack  
PS (Great tutorial!)

---

<div class="post-metadata">

**Author:** ![mpoisot](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@mpoisot](https://forums.kodeco.com/u/mpoisot)\
**Post date:** [July 6, 2017, 7:32pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/7 "2017-07-06T19:32:31Z")

</div>

Great tutorial. I’m curious if it’s possible to send a push notification with only a badge value (no alert, no sound)? Does Apple allow simply leaving out those fields?

---

<div class="post-metadata">

**Author:** ![jamilarif55](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jamilarif55/32/100826_2.png) [@jamilarif55](https://forums.kodeco.com/u/jamilarif55)\
**Post date:** [July 10, 2017, 6:50am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/8 "2017-07-10T06:50:51Z")

</div>

Why not objective-c ☹

* * *

---

<div class="post-metadata">

**Author:** ![gunjan07](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gunjan07/32/69956_2.png) [@gunjan07](https://forums.kodeco.com/u/gunjan07)\
**Post date:** [July 17, 2017, 9:46am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/9 "2017-07-17T09:46:56Z")

</div>

Great Tutorial … Thanks !!

I am new to iOS Development… Can you please help me with the Following 🙂  
Since we have used APNS to receive the notification… How can i use it with for the VoIP Notification ?

---

<div class="post-metadata">

**Author:** ![mayurtolani](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mayurtolani/32/81494_2.png) [@mayurtolani](https://forums.kodeco.com/u/mayurtolani)\
**Post date:** [July 21, 2017, 1:43am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/10 "2017-07-21T01:43:35Z")

</div>

How to implement our own server instead of using pusher? I hope to do it using a personal server running on EC2 on Golang. I do not expect you to give me the code for it. But just a bit explanation and few links.

---

<div class="post-metadata">

**Author:** ![georgek](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@georgek](https://forums.kodeco.com/u/georgek)\
**Post date:** [August 7, 2017, 7:34am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/11 "2017-08-07T07:34:39Z")

</div>

Can you please show how to use PushKit for sending notification for normal apps that do not use VoIP feature.

---

<div class="post-metadata">

**Author:** ![cwiedemann](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cwiedemann/32/81494_2.png) [@cwiedemann](https://forums.kodeco.com/u/cwiedemann)\
**Post date:** [August 17, 2017, 1:40pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/12 "2017-08-17T13:40:42Z")

</div>

Thank you Jozsef this was a great tutorial. I found it very helpful and easy to follow!

---

<div class="post-metadata">

**Author:** ![fbartolom](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fbartolom/32/111375_2.png) [@fbartolom](https://forums.kodeco.com/u/fbartolom)\
**Post date:** [August 25, 2017, 8:46am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/13 "2017-08-25T08:46:31Z")

</div>

I would need to send the notifications from my back office server on Centos. All the python libraries I tested give several errors when trying to send a notification and a node one I also tested does not allow to submit a payload. Is there a full tested version to suggest?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [August 25, 2017, 10:09am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/14 "2017-08-25T10:09:46Z")

</div>

@jozsef.vesza Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![johnnytucker69](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@johnnytucker69](https://forums.kodeco.com/u/johnnytucker69)\
**Post date:** [September 2, 2017, 6:33pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/15 "2017-09-02T18:33:35Z")

</div>

Thanks for the tutorial! FYI, in order to get rid of a “UI call made in the background” error/exception, I added calls to DispatchQueue.main.async as shown below:

```
func registerForPushNotifications() {
    UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in
        Log.msg("Permission granted: \(granted)")
        
        guard granted else {
            return
        }

        DispatchQueue.main.async {
            self.getNotificationSettings()
        }
    }
}

func getNotificationSettings() {
    UNUserNotificationCenter.current().getNotificationSettings { (settings) in
        Log.msg("Notification settings: \(settings)")
        
        guard settings.authorizationStatus == .authorized else {
            return
        }
        
        DispatchQueue.main.async {
            UIApplication.shared.registerForRemoteNotifications()
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![isnpms](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@isnpms](https://forums.kodeco.com/u/isnpms)\
**Post date:** [September 3, 2017, 10:52am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/16 "2017-09-03T10:52:48Z")

</div>

I am new in Swift 3 but this tutorial is great. I just would like to know how to use it for Distribution. Using Pusher app I need an specific token for one device. After I have generated an certificate for distribution, how do I send push notification this way? Thank you.

---

<div class="post-metadata">

**Author:** ![gabole](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@gabole](https://forums.kodeco.com/u/gabole)\
**Post date:** [September 5, 2017, 4:55pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/17 "2017-09-05T16:55:53Z")

</div>

hello  
followed your tutorial and its working great,thank you. however i have a problem: if i accept to receive notifications on app start, no problem all is working. but if i refuse, then my webview is not loaded. what and where should i had to continue the launching process if autorisation are refused ? currently it stop on "“permission granted: false”

thank you for your help

---

<div class="post-metadata">

**Author:** ![bhatia\_22karan](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@bhatia\_22karan](https://forums.kodeco.com/u/bhatia_22karan)\
**Post date:** [September 7, 2017, 4:46am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/18 "2017-09-07T04:46:42Z")

</div>

Hi All,

I am working as Native Android and iOS developer… I want to know I was reading over stackoverflow that Push notification for iOS app is not allowed without APNS…

So my question here is how FCM works for push notification for iOS app… please check below links:  
[https://firebase.google.com/docs/cloud-messaging/ios/client](https://firebase.google.com/docs/cloud-messaging/ios/client)

> **[Push notification in ios Using fcm (swift)](http://shubhank101.github.io/iOSAndroidChaosOverFlow/2016/07/Push-Notification-in-iOS-using-FCM-(Swift))**
>
> The final project is available for download from the Github repository

[https://firebase.google.com/docs/cloud-messaging/ios/receive](https://firebase.google.com/docs/cloud-messaging/ios/receive)

So can we do this by our selves…? meaning creating by own program… I was also reading Local Notification, XMPP…

Can we do it without APNS?

Thanks,  
KB

---

<div class="post-metadata">

**Author:** ![appswithheart](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/appswithheart/32/57439_2.png) [@appswithheart](https://forums.kodeco.com/u/appswithheart)\
**Post date:** [October 25, 2017, 5:45pm UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/19 "2017-10-25T17:45:45Z")

</div>

![57](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/5/e/5e847cd6d568c9088fcdb446523190b8cca49558.png)  
Hey everyone, just letting you know that the starter project from that link doesnt compile anymore.  
Is there any push notification tutorial, that still works?

Kind regards  
Leon

---

<div class="post-metadata">

**Author:** ![cyyeh](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/cyyeh/32/81468_2.png) [@cyyeh](https://forums.kodeco.com/u/cyyeh)\
**Post date:** [October 27, 2017, 2:12am UTC](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531/20 "2017-10-27T02:12:13Z")

</div>

> <https://github.com/drmohundro/SWXMLHash/issues/140>
>
> I found a related issue on the apple swift bugs site: https://bugs.swift.org/bro…wse/SR-4951
> 
> When I attempt to build with SWXMLHash on Xcode 9, I encounter the following error:
> SWXMLHash.XMLIndexer:72:22: error: invalid redeclaration of 'Element'
> public typealias Element = (SWXMLHash.XMLIndexer)
> 
> I can rename 'Element' (at line 457 of SWXMLHash.swift) to 'element' using Xcode9's new rename feature and my build works.

Here is the solution to solve this building failed problem.

[Next page](https://forums.kodeco.com/t/push-notifications-tutorial-getting-started/30531.md?page=2)
