In my app, I am adding push notification support.
In that can I show alert with "join" and "cancel" buttons instead of "view" and "cancel"?
Yes, its possible to change the "View" to "Join" button.
It has action-loc-key parameter to be set in push notification.
Look at the apple documentation
Related
When push notification popup is shown in app and tapped on home button then push notification popup will hide without taking any action (Allow/Don't Allow)
So, is there any way that without taking any action on push notification popup and when tapped on home button popup will not hide. Screen will remains same?
Thanks
Please check push notifications delegate methods.
IOS notification content extension: add buttons in MainInterface.storyboard and handle the click action without dismissing the notification
after making some research I discover that:
can not handle buttons clicks in the IOS notification content extension, only the type of button can be used is the media button, see the IOS documentation:
https://developer.apple.com/documentation/usernotificationsui/unnotificationcontentextension
The up answer is not correct, you can just add UNNotificationExtensionUserInteractionEnabled YES to the info.plist, then you can do every thing just like a common viewController
As Abdullah S. Al-Hallak said, it is not possible to perform actions that will lunch a certain screen. In Apple documentation, it is mentioned that "Do not install gesture recognizers or rely on touch events in your interface."
The only possible way is to add actions that will do some things in the presented notification only (like animation, as presented in this cool post: Adding a Custom UI and Interactivity in Local and Push Notifications)
I want to perform a action when a user slides up a push notification on home screen in iOS. Precisely which functions gets called when a user slides up a local push notification.
I could be wrong, but I think you cannot get that kind of event..
How to custom push notification button for when presented with the option to select to "Allow" or "Don't allow" push notification? Is it possible?
Thanks.
You can't customise the alert displayed that asks the user whether to Allow push notifications or not.
What some apps do is show an alert or image explaining what the push notifications are for, and when you press allow it shows the system Allow/Don't Allow alert.
I receive PushNotification as badge as well as alert and are displayed as badges on the app icon.
I receive the payload successfully when I click on alert, which appears at top area of the screen.
But, if the notification is received and I click on the application icon i don't get the payload in any of below mentioned the methods.
application:didFinishLaunchingWithOptions:
application:didReceiveRemoteNotification:
So, what could be the problem or have I missed something in handling such case.
That would be expected behavior. You don't want to show the push notification for the user if he himself did not actively chose to to tap on the alert. If user is in your app while receiving notification you can ask the user if he wants to view it or dismiss it.