OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.57k stars 375 forks source link

how add action button ios to payload onesignal json apns file in simultor? #1641

Open AFDHAL2009 opened 10 months ago

AFDHAL2009 commented 10 months ago

How can we help?

Hello ,I try to add action button in notification onesignal react-native ios.So i used apns file for test in simulator, the notification coming with dragging file but action button does not appear even i made a long press can anyone give me the correct aps format json and thinks for help this my payload apns file for test:

{
    "Simulator Target Bundle": "******",
    "aps": {
        "alert": {
            "title": "Push Notification",
            "subtitle": "Test Push Notifications",
            "body": "Testing Push Notifications on iOS Simulator",
            "actionButtons":[
                       {
                       "id":"test",
                       "text":"test"
                        }
                           ]

        }
    },
    "custom": {
        "i": "notificationId as UUID",
        "a": {"deeplinkKey": "{\"deeplinkDetailKey\":\"deeplinkDetailValue\"}", "launchURL": "example://collection/myCollectionId/type/1"}
    }
}

Code of Conduct

AFDHAL2009 commented 10 months ago

the onesigal console for notification show the full object received but actionButtons:[] still empty