简体   繁体   中英

iOS Worklight push Notification handling

ios push notification in worklight, Receiving Notification when app in background as badge, But when i click the badge also i am getting payload as alert. I need only badge when app running in background.

Actually I need to display alert when the app is in foreground and badge if the app in background. In my push received handler function I am checking that. But in ios the handler function get fires only when the user clicks on badge, in Android when push received it fires automatically.

You get an alert displaying that payload because that's how it is implemented in the sample project . If you don't want the alert, don't use an alert.

Likewise, badge handling is done via API.
Read the documentation for WL.Badge and remove or display badges per your required implementation.

If you want more precise help, you need to be more precise with your scenario.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM