-
Notifications
You must be signed in to change notification settings - Fork 29
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
Chore: Add support for Iterable Push notifications with Open URL
open action behaviour on iOS.
#66
Chore: Add support for Iterable Push notifications with Open URL
open action behaviour on iOS.
#66
Conversation
…onditions (using guard let), before continuing.
… protocol so that it can receive and propagate Iterable push notifications that are configured with the "Open URL" action. With this change in place, the openedNotificationHandler in the Flutter application will now also be called for Iterable push notifications that are set-up in Iterable as having the Open action behaviour type set to "Open URL". Prior to this change, the Flutter application would not be called when configured as "Open URL" so deep-link use cases were not supported.
Re-uses the userInfo reference to IterableAPI.lastPushPayload, since we have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far, this LGTM 👌🏻
Although I'm wondering if this change breaks some previous behavior ... did you have the chance to test it? could you?
Hi @cdmunoz - Great question. So, this change is purely additive - with no existing behaviour being changed (the changes in Beyond that, the change simply assigns a URL delegate on the Please see Iterable's Deep Links in Push Notifications documentation :- Regarding testing - as far as I am aware, everything continues to work as it did before (I did test it 😊) - our app was working with both the |
Open URL
open action behaviour on iOS.
Hey @cdmunoz - Thanks for approving. 💯 I meant to say earlier, thanks for writing this plugin. It is a life saver! I'll leave it for you guys to merge (my company's project is currently pointing at my fork, until this change is in your release). Thanks again. -- Mike. 🤓 |
What it does
SwiftIterableFlutterPlugin
class conform to theIterableURLDelegate
protocol so that it can receive and propagate Iterable push notifications that are configured with the "Open URL" action.openedNotificationHandler
in the Flutter application will now also be called for Iterable push notifications that are set-up in Iterable as having the Open action behaviour type set to "Open URL".Prior to this change, the Flutter application would not be called when configured as "Open URL" so deep-link use cases were not supported.
How to test (Unit test)
$ flutter test
.All tests passed!
How to test (iOS)
Having configured the application as per
iterable_flutter
instructions, and with theopenedNotificationHandler
also set in your Flutter code :-Open action
behaviour set to "Open URL".openedNotificationHandler
is called with the url specified in the campaign as follows :-Notes:
additionalData.url
key was actuallyadditionalData.uri
.additionalData.itbl.defaultAction.data
, to retrieve the url (although on Android, this seems to be delivered as aJSON
string, rather than an aDictionary
/Map
/Associative array
).