-
Notifications
You must be signed in to change notification settings - Fork 21
How to leverage Mirror push web view to forward users to web pages
Alexander Boldyrev edited this page Oct 31, 2024
·
1 revision
To provide url, which should be opened on notification tap or on Mirror push notification primary button tap, you can use API (notificationOptions.primaryButtonAction parameter, action type will be "WEB_VIEW_URL") or Infobip portal.
No additional coding is needed, but you could customize web view appearance or setup custom view controller for presenting web view
If you need to customize the title, toolbar appearance or activity indicator, implement the following callback function:
class MyMessageHandlingDelegate : MessageHandlingDelegate {
func inAppWebViewWillShowUp(_ webViewController: WebViewController, for message: MTMessage) {
webViewController.title = "Breaking news!" // to specify a custom title
webViewController.barTintColor = UIColor.blue // to change the toolbar color
webViewController.titleColor = UIColor.white // to change the toolbar title color
webViewController.tintColor = UIColor.red // to change the toolbar button color
webViewController.activityIndicator = YourCustomActivityIndicator() // implement your own UIView subclass that conforms to ActivityIndicatorProtocol protocol to replace the standard activity indicator
}
}
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
- Geofencing service
- Privacy settings
- In-app chat
- WebRTC Calls and UI