Skip to content

add features for ios9 #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 15, 2016
Merged

add features for ios9 #69

merged 12 commits into from
Feb 15, 2016

Conversation

mitkodev
Copy link

@mitkodev mitkodev commented Feb 2, 2016

No description provided.

@mitkodev
Copy link
Author

mitkodev commented Feb 2, 2016

@AntonDobrev ping

@ucswift
Copy link

ucswift commented Feb 4, 2016

@ddimitrov90, Telerik support directed us to your feature branch for iOS background notifications. We are currently testing this for use with iOS Interactive Notifications but are unable to determine how to set the slientCallback (if needed) as the ecb callback isn't getting the information about what button has been activated when that JS Callback is fired. Previously there would be an identifier property attached to the data or data.additionalData that would allow us to perform actions based on which button is pressed. Any thoughts?

Log output

: didReceiveRemoteNotification with fetchCompletionHandler
: Notification received
: Push Notification: On Notificaiton Recieved Event
: {"sound":"beep.caf","content-available":"1","alert":"Call Test Telerik Push #2","badge":"1","category":"CALLS","eventCode":"C41042","foreground":"0"}
: Push Plugin notificationProcessed called
: silentNotificationHandler called

@mitkodev
Copy link
Author

mitkodev commented Feb 5, 2016

hey @ucswift, sorry for the late response, just saw your comment

i think there is some misunderstanding - if you are sending a push notification and have the "content-available" setting in the payload, the "didReceiveRemoteNotification with fetchCompletionHandler" event handler will be used by iOS and you won't see any notification pop up actually on the phone. Those type of notifications will be processed in the background without you knowing that you've actually received one - this notifications are enabled/disabled by the Background-app refresh setting of the app on your phone.
So when you send such notification, do you see anything popping up on the phone, cause it sounds strange to me, but i'll double check it here too.

Also i think that the identifier - the pressed button, is still stored in the data object that you receive in the callback.

i'll check the comments here regularly, so waiting for your reply

@ucswift
Copy link

ucswift commented Feb 5, 2016

@ddimitrov90, I thought so as well about content-available. But after doing some testing that only seems to be true if you don't set an alert and sound. If you pass a push with content-available with an alert/sound there is a system notification shown, I believe there are a number is issues on the PG PushPlugin repo regarding that. The reason I included it in the payload was during the course of trying to get background interactive notifications to work.

I've also been using this as a reference: http://samwize.com/2015/08/07/how-to-handle-remote-notification-with-background-mode-enabled/

I played around with it a bit last night and it looks like the function handleActionWithIdentifier: forRemoteNotification: withResponseInfo: is iOS9 only and handleActionWithIdentifier: forRemoteNotification: is still needed for iOS8 with the safeHandler implementation.

@mitkodev
Copy link
Author

mitkodev commented Feb 5, 2016

@ucswift thanks for the clarification
i'll bring back the handler for ios8 compatibility and will check the scenario for silent push with sound/alert and will try to fix the result object that is received in the js callback

mitkodev added a commit that referenced this pull request Feb 15, 2016
@mitkodev mitkodev merged commit e26a813 into master Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants