OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
496 stars 263 forks source link

[question]: Handling local notifications (in app) #1471

Closed rahatmodi closed 2 months ago

rahatmodi commented 2 months ago

How can we help?

We use local notifications for some other features in the app. How do I

I am using addForegroundLifecycleListener and addClickListener but they don't fire for local notifications.

Code of Conduct

nan-li commented 2 months ago

Hi @rahatmodi thanks for reaching out.

You can set up and use local notifications, but that will be entirely managed by you.

The OneSignal SDK will only handle OneSignal-originated notifications.

rahatmodi commented 2 months ago

Yes I know that and I am trying to integrate the 2 worldsSince we are using your SDK for remote notifications we are are using your API's to receive 

onWillDisplayNotification

onClickNotification

It is here that I would usually look at it and determine that it is a local notification and deal with it hereHowever if it is a local notification these callbacks don't happen at all so I cannot take care of it.Looks like they only come if it is a OneSignal push..I could be wrong - can u verify this and  if what I am saying is indeed the case suggest what I need to do to receive them. ThanksRahat Modi On Thursday, August 22, 2024 at 11:18:06 AM PDT, Nan @.***> wrote:

Hi @rahatmodi thanks for reaching out.

You can set up and use local notifications, but that will be entirely managed by you.

The OneSignal SDK will only handle OneSignal-originated notifications.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>