Integration

🚧

In order to integrate the v2 version of inApp, please contact the indigitall support team

Banner format

Below we tell you how to instantiate one or more In-App messages in banner format.

Remember that you should first have them defined in the indigitall console. See our user manual for more info.

One single banner
Create a UIView view on your storyboard. The size must match what you have defined in the indigitall console ( Tools> In-App / In-Web Schemas ). Remember to translate the units from PX to iOS points.

@IBOutlet weak var myBanner: UIView!
@property (weak, nonatomic) IBOutlet UIView *myBanner;

Instantiate In-App messages using the showInApp method.

Indigitall.show(inApp: "myBanner_CODE", view: myBanner) { actions in
    print("Did touch with actions")
} onShowTimeFinished: { inApp, showTime) in
    //DO SOMETHING
} didExpired: { inApp, error in
    //DO SOMETHING
} didShowMoreThanOnce: { inApp, error in
    //DO SOMETHING
} didClickOut: { inApp, error in
    //DO SOMETHING
} success: { inApp in
    //DO SOMETHING
} failed: { error in
    // LOG ERROR
}
[Indigitall showInApp:myBanner_CODE view:myBanner didTouchWithAction:(INInAppAction *action^{
    // DO SOMETHING    
} onShowTimeFinished:^(INInApp * _Nonnull inApp, int showTime) {
    // DO SOMETHING    
} didExpired:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    // DO SOMETHING    
} didShowMoreThanOnce:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    // DO SOMETHING    
} didClickOut:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    // DO SOMETHING    
} success:^(INInApp * _Nonnull) {
    // DO SOMETHING    
} failed:^(INError * _Nonnull error) {
    // LOG ERROR
}];
var config: InAppConfig!
config = InAppConfig.init(appKey: "YOUR_APP_KEY")
//only Enterprise cases
config.domainInApp = "https://device-api.indigitall.com/v2"

InAppIndigitall.showInAppWith(inAppId: "myBanner_CODE", view: myBanner) { inApp in
   print("INAPP: \(inApp.inAppId)")            
} failed: { error in
   print("ERROR: \(error.message)")            
}
        
InAppIndigitall.showInApp(withAppKey: "YOUR_APP_KEY", inAppId: "myBanner_CODE", view: myBanner) { inApp in
   print("INAPP: \(inApp.inAppId)")           
} failed: { error in
   print("ERROR: \(error.message)")            
}
        
InAppIndigitall.showInApp(with: config, inAppId: "myBanner_CODE", view: myBanner) { action in
    print("Did Touch \(action.app)")
} onShowTimeFinished: { inApp, time in
    print("Did onShowTimeFinished")
} didExpired: { inApp, error in
    print("Did didExpired")
} didShowManyTimes: { inApp, error in
    print("Did onShowTimeFinished")
} didClickOut: { inApp, error in
    print("INAPP didClickOut: \(inApp.inAppId)")
} success: { inApp in
    print("INAPP: \(inApp.inAppId)")
} failed: { error in
    print("ERROR: \(error.message)")
}
InAppConfig *config = [[InAppConfig alloc]initWithAppKey:@"YOUR_APP_KEY"];
//only enterprises uses
[config setDomainInApp:@"https://device-api.indigitall.com/v2"];
    
[InAppIndigitall showInAppWithInAppId:@"myBanner_CODE" view:myBanner success:^(INInApp * _Nonnull) {
       //DO SOMETHING  
} failed:^(INError * _Nonnull error) {
     //DO SOMETHING
}];

[InAppIndigitall showInAppWithAppKey:@"YOUR_APP_KEY" inAppId:@"myBanner_CODE" view:myBanner success:^(INInApp * _Nonnull) {
     //DO SOMETHING
} failed:^(INError * _Nonnull error) {
     //DO SOMETHING
}];

[InAppIndigitall showInAppWithConfig:config InAppId:@"myBanner_CODE" view:myBanner didTouchWithAction:^(INInAppAction * _Nonnull action) {
     //DO SOMETHING
} onShowTimeFinished:^(INInApp * _Nonnull inApp, int showTime) {
     //DO SOMETHING
} didExpired:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
     //DO SOMETHING
} didShowManyTimes:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
     //DO SOMETHING
} didClickOut:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
     //DO SOMETHING
} success:^(INInApp * _Nonnull) {
     //DO SOMETHING
} failed:^(INError * _Nonnull error) {
     //DO SOMETHING
}];

Multiple banner
Create multiple views of UIView on your storyboard. The size must match what you have defined in the indigitall console ( Tools> In-App / In-Web Schemas ). Remember to translate the units from PX to iOS points.

@IBOutlet weak var viewBanner: UIView!
    @IBOutlet weak var viewBannerTwo: UIView!
    @IBOutlet weak var viewBannerThree: UIView!
    ...

var viewList = [UIView]()
viewList.append(viewBanner)
viewList.append(viewBannerTwo)
viewList.append(viewBannerThree)

var webViewCodes = [String]()
webViewCodes.append("myInApp_code_banner")
webViewCodes.append("myInApp_code_banner_two")
webViewCodes.append("myInApp_code_banner_three")
NSMutableArray <UIView *> *viewList;
[viewList addObject:yourCustomView];
[viewList addObject:yourCustomViewTwo];
[viewList addObject:yourCustomViewThree];

NSMutableArray <NSString *> *webViewCodes;
[webViewCodes addObject:@"myInApp_code_banner"];
[webViewCodes addObject:@"myInApp_code_banner_two"];
[webViewCodes addObject:@"myInApp_code_banner_three"];

Create an array of the views and codes of the inApp that you define in the console and instantiate the In-App messages using the showMultipleInApp method.

Indigitall.showMultiple(inApp: webViewCodes, listView: viewList) { inApp, view, action in
        print("INAPP didTouch: \(inApp.inAppId) y vista: \(view)")
    } onShowTimeFinished: { (inApp, view, showTime) in
        print("INAPP onShowTimeFinished: \(inApp.inAppId) y vista: \(view) en \(showTime)ms")
        view.isHidden = true
    } didExpired: { inApp, error in
        print("INAPP didExpired: \(inApp.inAppId) error: \(error.message)")
    } didShowMoreThanOnce: { inApp, error in
        print("INAPP didShowMoreThanOnce: \(inApp.inAppId) error: \(error.message)")
    } didClickOut: { inApp, error in
        print("INAPP didClickOut: \(inApp.inAppId) error: \(error.message)")
    } success: { inApp, view in
        print("INAPP success: \(inApp.inAppId) y vista: \(view)")
    } failed: { error in
        print("ERROR: \(error.message)")
    }

    [Indigitall showMultipleInApp:webViewCodes listView:viewList didTouchWithAction:^(INInApp * _Nonnull inApp, UIView * _Nonnull webView, INInAppAction *action) {
        // DO SOMETHING
    } onShowTimeFinished:^(INInApp * _Nonnull inApp, UIView * _Nonnull webView, int showtime) {
        // DO SOMETHING
    } didExpired:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
        // DO SOMETHING
    } didShowMoreThanOnce:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
        // DO SOMETHING
    } didClickOut:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
        // DO SOMETHING
    } success:^(INInApp * _Nonnull inapp, UIView * _Nonnull view) {
        // DO SOMETHING
    } failed:^(INError * _Nonnull error) {
        // LOG ERROR
    }];
}];
var config: InAppConfig!
config = InAppConfig.init(appKey: "YOUR_APP_KEY")
//only Enterprise cases
config.domainInApp = "https://device-api.indigitall.com/v2"

InAppIndigitall.showMultipleInAppWithList(inAppId: webViewCodes, listView: viewList) { inApp, view in
    //Do something
} failed: { error in
    //Do something    
}

InAppIndigitall.showMultipleInApp(withAppKey: "YOUR_APP_KEY", listInAppId: webViewCodes, listView: viewList) { inApp, view in
    //Do something
} failed: { error in
    //Do something
}

InAppIndigitall.showMultipleInApp(with: config, listInAppId: webViewCodes, listView: viewList) { inApp, view, action in
    //Did touch with action
} onShowTimeFinished: { inApp, view, time in
    //Do something
} didExpired: { inApp, error in
    //Do something
} didShowManyTimes: { inApp, error in
    //Do something
} didClickOut: { inApp, error in
    //Do something
} success: { inApp, view in
    //Do something
} failed: { error in
    //Do something
}
InAppConfig *config = [[InAppConfig alloc]initWithAppKey:@"YOUR_APP_KEY"];
//only enterprise cases
[config setDomainInApp:@"https://device-api.indigitall.com/v2"];
    
[InAppIndigitall showMultipleInAppWithListInAppId:webViewCodes listView:viewList success:^(INInApp * _Nonnull inapp, UIView * _Nonnull view) {
    //Do something
} failed:^(INError * _Nonnull error) {
    //Do something
}];

[InAppIndigitall showMultipleInAppWithAppKey:@"YOUR_APP_KEY" listInAppId:webViewCodes listView:viewList success:^(INInApp * _Nonnull inapp, UIView * _Nonnull view) {
    //Do something
} failed:^(INError * _Nonnull error) {
    //Do something
}];

[InAppIndigitall showMultipleInAppWithConfig:config listInAppId:webViewCodes listView:viewList didTouch:^(INInApp * _Nonnull inApp, UIView * _Nonnull webView, INInAppAction * _Nonnull action) {
    //Do something
} onShowTimeFinished:^(INInApp * _Nonnull inApp, UIView * _Nonnull webView, int showtime) {
    //Do something
} didExpired:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //Do something
} didShowManyTimes:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //Do something
} didClickOut:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //Do something
} success:^(INInApp * _Nonnull inapp, UIView * _Nonnull view) {
    //Do something
} failed:^(INError * _Nonnull error) {
    //Do something
}];

Popup Format

Here we tell you how to instantiate an In-App message in popup format.

Remember that you should first have it defined in the indigitall console. See our user manual for more info.

Create a WebView view in your layouts. The size must match what you have defined in the indigitall console ( Tools> In-App / In-Web Schemas ). Remember to translate the units from PX to iOS points.

Indigitall.showPopup("myInApp_code_popup", didAppear: {
    // DO SOMETHING
} didCancel: {
    print("Did cancel")
} didTouchWithAction: {
    print("Did touch")
} didDismissed: {
    print("Did dissmised")
} onShowTimeFinished: { inApp, showTime in
    print("Did onShowtimeFinished \(inApp.inAppId) on \(showTime)ms")
} didExpired: { inApp, error in
    print("Did didExpired")
} didShowMoreThanOnce: { inApp, error in
    print("Did didShowMoreThanOnce")
} didClickOut: { inApp, error in
    print("Did didClickOut")
} didDismissForever: { inApp, error in
    print("Did didDismissForever")
} failed: {error in
    print("Did failed \(error.description) with message: \(error.message)")
}
[Indigitall showPopup:@"myInApp_code_popup-Inapp" didAppear:^{
        // DO SOMETHING 
    } didCancel:^{
        // DO SOMETHING 
    } didTouchWithAction:^(INInAppAction *action){
        // DO SOMETHING 
    } didDismissed:^{
        // DO SOMETHING 
    } onShowTimeFinished:^(INInApp *inApp, int showTime){
        // DO SOMETHING 
    } didExpired:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } didShowMoreThanOnce:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } didClickOut:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } didDismissForever:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } failed:^(INError * _Nonnull error) {
       // LOG ERROR
    }];
InAppIndigitall.showPopup(withPopupId: "myInApp_code_popup") {
    //do something
} didCancel: {
    //do something
} failed: { error in
    //do something
}

InAppIndigitall.showPopup(withAppKey: "YOUR_APP_KEY", popupId: "myInApp_code_popup") {
    //do something
} didCancel: {
    //do something
} failed: { error in
    //do something
}
[InAppIndigitall showPopupWithPopupId:@"" didAppear:^{
    //do something
} didCancel:^{
    //do something
} failed:^(INError * _Nonnull error) {
    //do something
}];

[InAppIndigitall showPopupWithAppKey:@"" popupId:@"" didAppear:^{
    //do something
} didCancel:^{
    //do something
} failed:^(INError * _Nonnull error) {
    //do something
}];

If you want to customize the icon to close the Popup, you can do it with the following method to which you can pass a custom UIButton , if you want to use our icon, just pass a null. The closeIconDisabled parameter is in case you don't want to show any icon, setting it to true to hide it or false to show it.

let closeButton = UIButton()
.
.//set UIButton params
.
Indigitall.showPopup("myInApp_code_popup-InApp", closeIcon: closeButton, closeIconDisabled: false) {
        print("Did appear")
    } didCancel: {
        print("Did cancel")
    } didTouchWithAction: { action in
        print("Did didTouchWithAction")
    } didDismissed: {
        print("Did dissmised")
    } onShowTimeFinished: { inApp, showTime in
        print("Did onShowtimeFinished \(inApp.inAppId) on \(showTime)ms")
    } didExpired: { inApp, error in
        print("Did didExpired")
    } didShowMoreThanOnce: { inApp, error in
        print("Did didShowMoreThanOnce")
    } didClickOut: { inApp, error in
        print("Did didClickOut")
    } didDismissForever: { inApp, error in
        print("Did didDismissForever")
    } failed: {error in
        print("Did failed \(error.description) with message: \(error.message)")
    }
[Indigitall showPopup:@"myInApp_code_popup-InApp", closeIcon: closeButton, closeIconDisabled: false, didAppear:^{
        // DO SOMETHING 
    } didCancel:^{
        // DO SOMETHING 
    } didTouchWithAction:^(INInAppAction *action){
        // DO SOMETHING 
    } didDismissed:^{
        // DO SOMETHING 
    } onShowTimeFinished:^(INInApp *inApp, int showTime){
        // DO SOMETHING 
    } didExpired:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } didShowMoreThanOnce:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } didClickOut:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } didDismissForever:^(INInApp *inApp, INError *error){
        // DO SOMETHING 
    } failed:^(INError * _Nonnull error) {
       // LOG ERROR
    }];
var config: InAppConfig!
config = InAppConfig.init(appKey: "YOUR_APP_KEY")
//only Enterprise cases
config.domainInApp = "https://device-api.indigitall.com/v2"

InAppIndigitall.showPopup(with: config, popupId: "myInApp_code_popup", closeIcon: closeicon, closeIconDisabled: false) {
    //do something
} didCancel: {
    //do something
} didTouchWithAction: { action in
    //do something
} didDismissed: {
    //do something
} onShowTimeFinished: { inApp, time in
    //do something
} didExpired: { inApp, error in
    //do something
} didShowManyTimes: { inApp, error in
    //do something
} didClickOut: { inApp, error in
    //do something
} didDismissForever: { inApp, error in
    //do something
} failed: { error in
    //do something
}
InAppConfig *config = [[InAppConfig alloc]initWithAppKey:@"YOUR_APP_KEY"];
//only enterprise cases
[config setDomainInApp:@"https://device-api.indigitall.com/v2"];
 
 
[InAppIndigitall showPopupWithConfig:config popupId:@"" closeIcon:closebutton closeIconDisabled:false didAppear:^{
     //DO SOMETHING
} didCancel:^{
    //DO SOMETHING
} didTouchWithAction:^(INInAppAction * _Nonnull action) {
    //DO SOMETHING
} didDismissed:^{
    //DO SOMETHING
} onShowTimeFinished:^(INInApp * _Nonnull inApp, int showTime) {
    //DO SOMETHING
} didExpired:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //DO SOMETHING
} didShowManyTimes:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //DO SOMETHING
} didClickOut:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //DO SOMETHING
} didDismissForever:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
    //DO SOMETHING
} failed:^(INError * _Nonnull error) {
    //DO SOMETHING
}];