# Sendbird-ios-framework - push notifications shown but not triggered

**URL:** <https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824>\
**Category:** iOS\
**Tags:** push-notification, chatsdk\
**Created:** [March 5, 2021, 2:02pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824 "2021-03-05T14:02:27Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 5, 2021, 2:02pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/1 "2021-03-05T14:02:27Z")

</div>

Hi I have installed sendbird-ios-framework 3.0.216. When a user sends a message, the push notification is successfully shown however the didReceiveRemoteNotification is never triggered in AppDelegate.Furthermore when the notification is shown my notification badge is overriden with the send bird one. Any ideas?

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [March 5, 2021, 6:10pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/2 "2021-03-05T18:10:17Z")

</div>

`didReceiveRemoteNotification` is triggered when a user clicks on the push notification. If you want to run some logic when a push is arrive, you have to implement `didReceiveRemoteNotification:fetchCompletionHandler`  
If you use push notification other than sendbird (i.e. your own push), then you have to adjust badge count manually when a push is received on the device.

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 5, 2021, 7:09pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/3 "2021-03-05T19:09:46Z")

</div>

I impement didReceiveRemoteNotification:fetchCompletionHandler.I have enabled and background capabilities but nothing happens.

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [March 5, 2021, 7:39pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/4 "2021-03-05T19:39:22Z")

</div>

SDK only provides a way to register token and thats all. Without read and debug with actual implementation, its really hard to tell what’s wrong ☹ does your push (not sendbird push) trigger the method?

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 6, 2021, 8:58am UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/5 "2021-03-06T08:58:44Z")

</div>

Yes it does,I had before 3.0150 and the push notifications where not coming in the develop version and I just updated to the latest release and this issue came up.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 8, 2021, 5:06pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/6 "2021-03-08T17:06:24Z")

</div>

@Spiros_Skordos,

Could you DM me the following items for me to take a look at?

- APP\_ID
- User used for testing push notifications
- Timeframe when you would have expected a notification but did not receive one? The more specific the better so I can track it down.

Thanks!

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 8, 2021, 9:48pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/8 "2021-03-08T21:48:34Z")

</div>

I am still looking into the bulk of the issue you reported, however in regards to your app badge being overwritten by the Sendbird count, you can change the settings in your Application to prevent that.  
In Settings \> Notifications, you can edit your APNs cert and turn off the badge, and that should fix that behavior.

Thanks,  
Tyler

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 9, 2021, 7:58am UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/9 "2021-03-09T07:58:09Z")

</div>

It’s already off.I enabled it for a test and since then the described behaviour is happening

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 9, 2021, 2:00pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/10 "2021-03-09T14:00:38Z")

</div>

Just ensure I’m understanding correctly. You’re saying that the badge behavior only started occurring when you turned the badge option on within the dashboard?

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 9, 2021, 2:09pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/11 "2021-03-09T14:09:50Z")

</div>

I can not verify that as I enabled this feature while I was trying to make push notifications to work.The solution to make it work finally was to update the pod.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 9, 2021, 2:18pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/12 "2021-03-09T14:18:04Z")

</div>

Okay, so updating the pod has resolved this issue for you?

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 9, 2021, 2:20pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/13 "2021-03-09T14:20:18Z")

</div>

Updating the pod resolved the for making the push notification received.Right now the problem is that the  
didReceiveRemoteNotification:fetchCompletionHandler is not triggered and the badge is overriden with unread count.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 9, 2021, 5:42pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/14 "2021-03-09T17:42:02Z")

</div>

I’m still looking into your didReceiveRemoteNotification:fetchCompletionHandler, however I did take a quick look at your account and I notice that you do still have badges on for your chat notifications. This is likely why the Sendbird push is overriding your badge icon:

 ![IPNE0mYl](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/9/90076ad8f033aed2ce1d1596a162f592da0cd3d5.png)

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 9, 2021, 5:42pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/15 "2021-03-09T17:42:43Z")

</div>

To help me with the `didReceiveRemoteNotification:fetchCompletionHandler`, can you share with me your implementation of it?

Thanks

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 9, 2021, 6:01pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/16 "2021-03-09T18:01:07Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/8/83978c338ba8c1b95e190467cbe086af9b34bdd7.png)

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 9, 2021, 6:06pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/17 "2021-03-09T18:06:49Z")

</div>

Hi I changed the setting to content-availble to on and now it seems to work,is this fine? should I have it enabled ?

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 9, 2021, 6:16pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/18 "2021-03-09T18:16:35Z")

</div>

Looking through the Apple Developer forums as well as Apple’s documentation, it does look like it would make sense that Content-Available does need to be enabled in order for it to be trigger, otherwise it assumes no new data is available to fetch.

---

<div class="post-metadata">

**Author:** ![Spiros\_Skordos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/spiros_skordos/32/1050_2.png) [@Spiros\_Skordos](https://community.sendbird.com/u/Spiros_Skordos)\
**Post date:** [March 9, 2021, 6:19pm UTC](https://community.sendbird.com/t/sendbird-ios-framework-push-notifications-shown-but-not-triggered/1824/19 "2021-03-09T18:19:52Z")

</div>

ok it seems that the issue is resolved. Thank you very much for the support I appreciate it.
