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"}
}
}
OneSignal does not support action buttons in iOS push notifications. You can achieve a similar effect by including a category in your payload. Here's an example of modifying your payload to add a category.
In your app's code, you can handle the category in the didReceiveRemoteNotification method of your UNUserNotificationCenterDelegate
User Notifications Push user-facing notifications to the user’s device from a server, or generate them locally from your app : https://developer.apple.com/documentation/usernotifications