In-App Notification Modules
In-App Message
In-App Messages are notifications shown to your users when they are active directly in your mobile app. Add the following code right after the RelatedDigital.initialize method to enable the In-App Message feature.
RelatedDigital.inAppNotificationsEnabled = true
After each customEvent call, it is checked for In-App Message. You can create and customize In-App Message on https://intelligence.relateddigital.com/#Target/TargetingAction/TAList page of RMC administration panel.
There are 12 different In-App Message designs available:
Pop-up - Image, Title, Text and Button | Mini - Icon and Text | Full Screen Image |
|
| |
Full Screen Image and Button | Pop-up - Image, Title, Text and Button | Pop-up Survey |
|
|
|
Pop-up - NPS with Text and Button | Native Alert & Action Sheet | 1-10 Rating NPS |
|
| |
Starred Survey & Second Popup | Half Screen Image | Carousel |
|
|
|
Video | Drawer |
|
|
|
|
If you want to manage the links you have added for inappler yourself, you can follow the step below.
First you have to call the delegate method.
RelatedDigital.inappButtonDelegate = self
Then you can add the extension block and edit the code below according to you.
extension YOUR_VIEW_CONTROLLER: RDInappButtonDelegate {
func didTapButton(_ notification: RDInAppNotification) {
print("notification did tapped...")
print(notification)
}
}
Using In-App Custom Fonts
First, put the font you want to use in the In-App to the root directory of your project.
Then, you need to define the font you put in the root directory with its extension (.ttf or .otf) in Info.plist. Ex: Sydney.ttf
Favorite Attribute Actions
You can access Target Action favorite features of the Favorite Attribute Action type you defined from the https://intelligence.relateddigital.com/#Target/TargetingAction/TAList/ section in the RMC panel via the mobile application as follows.
If you want, you can access the features of the favorite feature action by specifying the ID of the Target Action.
Favorite Properties Action returns the following values as an enum.
Story Manager
Story Banner and Story Action
Story Action allows you to add “Story” widgets within your app that can be viewed on iOS devices. The getStoryView method returns an instance of RDStoryHomeView, which is a subclass of UIView.
You can also summon a Story Action you want according to the Target Action ID.
If you add a clickable URL, you can manage it with framework or direct deeplink to open in browser. However, in order to manage it on your own, you need to add the following code to the classes that comply with RDStoryURLDelegate.
After this plugin, set the urlDelegate self.
Clickable URL is not handled by SDK after adding RDStoryURLDelegate!
Mail Subscription Form
After creating the mail membership form from the RMC panel, as in the in-app message, each time you call a customEvent, it is checked whether there is a mail membership form or not, and then the mail membership form is displayed.
Spin To Win
After creating the Spin to Win from the RMC panel, as in the in-app message, each time you call a customEvent, it is checked whether there is a Spin to Win and then the Spin to Win is displayed.
Spin to Win Half Screen | Spin to Win Full Screen |
---|---|
Scratch To Win
After creating the Scratch to Win from the RMC panel, as in the in-app message, each time you call a customEvent, it is checked whether there is a Scratch to Win and then the Scratch to Win is displayed.
Gift Rain
After creating the Gift Rain from the RMC panel, as in the in-app message, each time you call a customEvent, it is checked whether there is a Gift Rain and then the Gift Rain is displayed.
App Banner
To use the App Banner action, you first need to create and add a UIView in your application where you want it to appear. Then, you can call the getBannerView method to show banners within this UIView. Below, you can find an example of creating a UIView and displaying banners within it.
f you wish, you can send extra query parameters with the properties parameter. If you don't want to use it, you can change the properties parameter to properties: [String:String].
When your users perform a click action on the banner, deeplinks need to be handled and redirected by you. To do this, you can capture the URL using the RDInappButtonDelegate protocol. An example usage is as follows:
When your users click on the banner, the deeplinks should be handled and directed by you. For this, you must add BannerDelegate to the relevant class.
Then you can customize it by adding the following function.
Product Stat Notifier
The Product Stat Notifier action that you define in the RMC Panel works in Product View, Add to Cart and Add/Remove Favorites events. You must make sure that the product id is sent in these events.
Recommendation
Product recommendations are obtained by the SDK's recommend method. To get product recommendations you must pass 2 mandatory arguments which are zoneId, productCode.
The RDProduct class looks after the following features:
Property | Type |
---|---|
code | String |
title | String |
img | String |
dest_url | String |
brand | String |
price | Double |
dprice | Double |
cur | String |
dcur | String |
freeshipping | Bool |
samedayshipping | Bool |
rating | Int |
comment | Int |
discount | Double |
attr1 | String |
attr2 | String |
attr3 | String |
attr4 | String |
attr5 | String |
If the suggested products are available for the arguments given in the Completion method, you must process the product array.
You can also pass a set of filters for the recommend method. For example, the following application will only return products that contain laptop in the title.
Recommendation Click Reports
In order to display the reports on the panel after clicking on the products in the widget, you need to call the code below in the recommend method.
Copyright 2020 Related Digital