# iOS 10 Screencast: Manipulating Push Notifications with Service Extensions

**URL:** <https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570>\
**Category:** 🎓 Courses & Articles\
**Created:** [July 20, 2016, 1:04pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570 "2016-07-20T13:04:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![samdavies](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/samdavies/32/108448_2.png) [@samdavies](https://forums.kodeco.com/u/samdavies)\
**Post date:** [July 20, 2016, 1:04pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/1 "2016-07-20T13:04:05Z")

</div>

Discover how to use the new notification service extension point which has the ability to intercept push notifications before they're delivered to the user.

 
* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/4976-ios-10-manipulating-push-notifications-with-service-extensions](https://www.raywenderlich.com/4976-ios-10-manipulating-push-notifications-with-service-extensions)

---

<div class="post-metadata">

**Author:** ![billhanyu](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/billhanyu/32/37461_2.png) [@billhanyu](https://forums.kodeco.com/u/billhanyu)\
**Post date:** [July 22, 2016, 3:06pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/2 "2016-07-22T15:06:16Z")

</div>

Hi Sam, I’m trying to implement the notification service extension but somehow my `didReceive` method is not called. I have included `mutable-content:1` in my payload. What could the problem be?  
Thank you!

---

<div class="post-metadata">

**Author:** ![harsh08](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/harsh08/32/37385_2.png) [@harsh08](https://forums.kodeco.com/u/harsh08)\
**Post date:** [July 28, 2016, 3:42pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/3 "2016-07-28T15:42:23Z")

</div>

Hi Sam,

Thank you for great tutorials, I was wondering is it possible to update device id in pusher through code? if I have device ID’s of all the devices which has my app installed and I am trying to send notification to specific device.

---

<div class="post-metadata">

**Author:** ![micpringle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/micpringle/32/104997_2.png) [@micpringle](https://forums.kodeco.com/u/micpringle)\
**Post date:** [September 13, 2016, 2:11pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/4 "2016-09-13T14:11:51Z")

</div>

Hey Sam,

Where did you get the **Pusher** app from?

---

<div class="post-metadata">

**Author:** ![samdavies](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/samdavies/32/108448_2.png) [@samdavies](https://forums.kodeco.com/u/samdavies)\
**Post date:** [September 13, 2016, 4:38pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/5 "2016-09-13T16:38:13Z")

</div>

@micpringle: it’s available on GitHub, or installable via homebrew:

> **[GitHub - noodlewerk/NWPusher: OS X and iOS application and framework to play...](https://github.com/noodlewerk/NWPusher)**
>
> OS X and iOS application and framework to play with the Apple Push Notification service (APNs) - GitHub - noodlewerk/NWPusher: OS X and iOS application and framework to play with the Apple Push Not...

@harsh08: I don’t think it is in the macOS app, but you can use `NWPusher` as a framework in your own app. It wouldn’t be difficult to write an app that does what you want. Check out the above linked GitHub page for more details.

@billhanyu: Sorry about the delay - and now that I’m replying I don’t think it’ll be any help anyway. I don’t have any ideas, no. Hopefully you’ve solved it by now anyway! 😊

sam

---

<div class="post-metadata">

**Author:** ![elkucho](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/elkucho/32/96668_2.png) [@elkucho](https://forums.kodeco.com/u/elkucho)\
**Post date:** [June 28, 2017, 5:57pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/6 "2017-06-28T17:57:08Z")

</div>

Hi, I have followed the template and everything works nice and thank you for that. I’ve seen a lot of them and yours saved me 🙂

I do have a question and I apologize in advance if it’s too obvious…

Can we have actions for REMOTE Push Notifications?

My app currently receives Remote Push Notifications and acts on the click but what I was not able to achieve is have a Remote PN with Actions. Such as “Remind Me Later” and “Dismiss”.

---

<div class="post-metadata">

**Author:** ![samdavies](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/samdavies/32/108448_2.png) [@samdavies](https://forums.kodeco.com/u/samdavies)\
**Post date:** [July 6, 2017, 5:00am UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/7 "2017-07-06T05:00:20Z")

</div>

Hi @elkucho

Glad it helped you out.

You can indeed specify custom actions with remote notifications.

1. In your app, create a notification category (`UNUserNotificationCategory`) and set up the correct set of actions (`UNUserNotificationAction`) with each category.
2. Register these categories with your app on first-launch
3. Specify the name of the category you registered in the `category` field of the remote notification payload
4. Implement the `userNotificationCenter(_:didReceive:withCompletionHandler:)` method on your `UNUserNotificationCenterDelegate` to handle each of the actions you specified in your category.

Hope that helps

sam

---

<div class="post-metadata">

**Author:** ![gprasant](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gprasant/32/111488_2.png) [@gprasant](https://forums.kodeco.com/u/gprasant)\
**Post date:** [July 6, 2018, 8:24pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/8 "2018-07-06T20:24:16Z")

</div>

Hello @samdavies ,

Thank you for the screencast. Are you planning to add any material around testing app extensions ? I am trying to add unit tests to an app extension. And I am not able to find any tutorials around that topic.

---

<div class="post-metadata">

**Author:** ![samdavies](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/samdavies/32/108448_2.png) [@samdavies](https://forums.kodeco.com/u/samdavies)\
**Post date:** [July 7, 2018, 12:46pm UTC](https://forums.kodeco.com/t/ios-10-screencast-manipulating-push-notifications-with-service-extensions/17570/9 "2018-07-07T12:46:32Z")

</div>

Hi @gprasant.

Glad you enjoyed the screencast. I’m not entirely sure what content we’ll be producing on this topic in future, but I’m sure that @jessycatterwaul will be keen to hear your feedback. I’ll pass it on to him.

I’m also not aware of any content that touches on this topic—I suspect it’d be challenging, although I think Xcode handles extensions far better than it did when I produced these screencasts.

Thanks

sam
