# About Push notifications with vapor

**URL:** <https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073>\
**Category:** Server Side Swift with Vapor\
**Created:** [August 14, 2019, 4:37pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073 "2019-08-14T16:37:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![choioi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/choioi/32/102075_2.png) [@choioi](https://forums.kodeco.com/u/choioi)\
**Post date:** [August 14, 2019, 4:37pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/1 "2019-08-14T16:37:53Z")

</div>

Sorry but there doesn’t seem to be this topic in the forum. Does anyone share or suggest which to use?

i found something:

> **[GitHub - swift-server-community/APNSwift: An HTTP/2 APNS library built on...](https://github.com/swift-server-community/APNSwift)**
>
> An HTTP/2 APNS library built on AsyncHTTPClient. Contribute to swift-server-community/APNSwift development by creating an account on GitHub.

> **[GitHub - matthijs2704/vapor-apns: Simple APNS Library for Vapor (Swift)](https://github.com/matthijs2704/vapor-apns)**
>
> Simple APNS Library for Vapor (Swift). Contribute to matthijs2704/vapor-apns development by creating an account on GitHub.

> **[GitHub - PerfectlySoft/Perfect-Notifications: Apple Push Notifications (APNs)...](https://github.com/PerfectlySoft/Perfect-Notifications)**
>
> Apple Push Notifications (APNs) Server-Side library. - GitHub - PerfectlySoft/Perfect-Notifications: Apple Push Notifications (APNs) Server-Side library.

> **[Getting started with Vapor and push notifications](https://pusher.com/tutorials/vapor-push-notifications/)**
>
> Build a Vapor server that sends push notifications and handles simple GET and POST requests. You will also create a simple iOS app, to demonstrate the full functionality.

Any other idea?

---

<div class="post-metadata">

**Author:** ![0xtim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/0xtim/32/111111_2.png) [@0xtim](https://forums.kodeco.com/u/0xtim)\
**Post date:** [August 15, 2019, 11:07am UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/2 "2019-08-15T11:07:50Z")

</div>

Hey @choioi

So with push notifications you basically have 2 options:

- Use a 3rd party services like Pusher, SNS, Urban Airship etc. This is usually the easiest route, works across iOS Android and Web and will be the quickest
- Do it yourself.

Assuming you want to go down the DIY route you have a couple of options but nothing great at the moment. The main issue is that HTTP/2 support is limited to say the least. NIO2 now has HTTP/2 support, so you can either use Kitura like that or build on top of NIO2 directly (or wait for Vapor 4). Another option that the `vapor-apns` library uses is making sure you have access to HTTP/2 via Curl, which usually requires you to have a custom Docker container. But it’s definitely possible!

---

<div class="post-metadata">

**Author:** ![choioi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/choioi/32/102075_2.png) [@choioi](https://forums.kodeco.com/u/choioi)\
**Post date:** [August 16, 2019, 4:47am UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/3 "2019-08-16T04:47:09Z")

</div>

Thanks i using [GitHub - MihaelIsaev/FCM: ⚡️ PushNotifications through FireBase for Vapor 3 and 4.](https://github.com/MihaelIsaev/FCM), it’s very good

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kylebrowning/32/102466_2.png) [@kylebrowning](https://forums.kodeco.com/u/kylebrowning)\
**Post date:** [August 24, 2019, 4:46pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/4 "2019-08-24T16:46:21Z")

</div>

FWIW The APNSwift library doesn’t require curl, and supports HTTP/2.  
Im the author of it and can answer any questions you may have.

---

<div class="post-metadata">

**Author:** ![gflo](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gflo/32/81494_2.png) [@gflo](https://forums.kodeco.com/u/gflo)\
**Post date:** [August 28, 2019, 7:53pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/5 "2019-08-28T19:53:37Z")

</div>

Hey @choioi! , quick question since I haven’t been able to find anyone else who’s used [https://github.com/MihaelIsaev/FCM](https://github.com/MihaelIsaev/FCM) library.

How do you send the Firebase Registration token to the Vapor code? I made my Token model conform to `Firebaseable` protocol like suggested in the FCM ReadMe, however I can’t find a good way to initialize the `firebaseToken` property in `Token`. I can’t call sendPush(…) without setting that 😓

---

<div class="post-metadata">

**Author:** ![choioi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/choioi/32/102075_2.png) [@choioi](https://forums.kodeco.com/u/choioi)\
**Post date:** [April 26, 2020, 7:19pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/6 "2020-04-26T19:19:58Z")

</div>

in model User … i create firebaseToken: String after client login will sent this token to server and we saved it.

---

<div class="post-metadata">

**Author:** ![choioi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/choioi/32/102075_2.png) [@choioi](https://forums.kodeco.com/u/choioi)\
**Post date:** [May 10, 2020, 11:03am UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/7 "2020-05-10T11:03:03Z")

</div>

i try install APNSwift with vapor 4, but cant not import No such module ‘APNSwift’, which i missing for installed?

---

<div class="post-metadata">

**Author:** ![ashi027](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ashi027/32/81494_2.png) [@ashi027](https://forums.kodeco.com/u/ashi027)\
**Post date:** [May 31, 2020, 3:06pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/8 "2020-05-31T15:06:59Z")

</div>

I am also getting same issue.

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kylebrowning/32/102466_2.png) [@kylebrowning](https://forums.kodeco.com/u/kylebrowning)\
**Post date:** [June 1, 2020, 5:10pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/9 "2020-06-01T17:10:00Z")

</div>

If you’re using Vapor, please install [GitHub - vapor/apns: Helpful extensions and abstractions for using APNSwift](https://github.com/vapor/apns)

---

<div class="post-metadata">

**Author:** ![choioi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/choioi/32/102075_2.png) [@choioi](https://forums.kodeco.com/u/choioi)\
**Post date:** [June 15, 2020, 5:25am UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/10 "2020-06-15T05:25:22Z")

</div>

Yes, thanks , [vapor/apns](https://github.com/vapor/apns) im using work fine with vapor4.

---

<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:** [July 5, 2020, 1:20am UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/11 "2020-07-05T01:20:09Z")

</div>

@choioi @ashi027 Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![choioi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/choioi/32/102075_2.png) [@choioi](https://forums.kodeco.com/u/choioi)\
**Post date:** [August 27, 2020, 2:52pm UTC](https://forums.kodeco.com/t/about-push-notifications-with-vapor/79073/12 "2020-08-27T14:52:41Z")

</div>

No, i have no issue anymore., i using [vapor/apns](https://github.com/vapor/apns)
