Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.github
CustomInApp.xcodeproj
CustomInApp
Vendors/SDWebImage
README.md

README.md

Accengage logo

Platform Target Devices

Accengage In-App Notifications enables you to create rich and customizable in-app notifications. This project demonstrates how to create and configure fully customizable In-App Notifications using the Additional display parameters.


Screenshot 1   Screenshot 2   Screenshot 3


Usage

To ensure a good and a smooth usage of this sample, there are a few important steps that you need to take.

  1. Configuration file

Complete the AccengageConfig.plist with your own partner id and private key.

  1. Add a new In-App template

In your application target you need to add a new In-App template. From the Settings panel press the in the right of the INAPP TEMPLATES. When prompted, complete the fields with the next values:

Name Customizable Text Interstitial
Value CustomizableTextInterstitial
Type ⬜️ Banner Text
Message display
Landing page ⬜️
Interstitial

Accengage logo

  1. Create your segment

  2. Create the In-App Notification

Customising the appearance

In order to customise the In-App appearance, you can play with the attributes of each customizable object.

Customizable objects

Diagram

Object Id Type
Container container view
Header Image header.img image
Icon Image icon.img image
Title title label
Subtitle subtitle label
Body body label
Left Button left.btn button
Right Button right.btn button
Bottom Button bottom.btn button
Close Button close.btn button

Customizable objects attributes

IMPORTANT❗️ If a required attribute is missing the related view will be removed.

Common attributes

Common attributes Description
bg.color The background.
border.color The border color
border.width The border width
border.radius The corner radius
hidden If added the related object will be removed from the super view

Label attributes

Label attributes Description Required
text Specifies the content of the label.
color The text color.

Button attributes

Button attributes Description Required
text Specifies the title of the button. except for Close Button
color The text color.
action.type The button action
action.value The action's value
action.extra The action's extra parameters

Image attributes

Image attributes Description Required
url The image URL or name

Actions

Types

Action type Description
udi               Execute Accengage updateDeviceInfo:
url Open an URL with UIApplication openURL:
event Execute Accengage trackEvent:withParameters:
request Send an async GET request

Examples

UDI

To update a custom_field with the value new_value when the user clicks on the left button:

Additional display parameters KEY Additional display parameters VALUE
left.btn.action.type udi
left.btn.action.value custom_field
left.btn.action.extra new_value

The action will be:

[Accengage updateDeviceInfo:@{@"custom_field": @"new_value"}]

Event

To trigger an Event with a type 1050 and extra param auth when the user clicks on the left button:

Additional display parameters KEY Additional display parameters VALUE
left.btn.action.type event
left.btn.action.value 1050
left.btn.action.extra auth

The action will be:

[Accengage trackEvent:1050 withParameters:@[@"auth"]];

URL

To open an URL when the user clicks on the left button:

Additional display parameters KEY Additional display parameters VALUE
left.btn.action.type url
left.btn.action.value myapp://home/

The action will be:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"myapp://home/"]];

Usage examples

Example 1

Diagram

Example 2

Diagram

You can’t perform that action at this time.