In-App Message Templates

🚧

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

InApp Utilities

In the event that you want to show the InApp scheme in a different way to how our SDK paints it, we put at your disposal some methods so that you can customize the "painting", without affecting the statistics or the InApp functionalities.

InApp object pickup

InAppHandler.init().getInApp(inAppId) { content, inApp in
    //DO SOMETHING
} errorLoad: { error in
    //Show error
}
[[[InAppHandler alloc]init] getInApp:inAppId success:^(NSString *content, INInApp *inApp) {
    //DO SOMETHING
} errorLoad:^(INError *error) {
    //Show error
}];
InAppHandler.getInApp("YOUR_BANNER_CODE") { inApp in
    //do something        
} errorLoad: { error in
    //do something            
}
[InAppHandler getInApp:@"YOUR_BANNER_CODE" success:^(INInApp * _Nonnull inApp) {
     //DO SOMETHING
} errorLoad:^(INError * _Nonnull error) {
       //DO SOMETHING         
}];

Check if the InApp should be displayed

Thanks to the InApp functionalities, it is possible to indicate that the inApp is displayed or pressed a maximum number of times, or if in the case of the popUp, after performing an action , such as pressing the close button, is not shown again. To do this we could do the following within the inAppGet method that we have seen previously:

InAppHandler.init().getInApp(inAppId) { content, inApp in
    if (inApp.properties.dismissForever &&
        InAppUtils.is(inAppDismissForever: inApp)) {
        //Dismiss Forever
    } else {
        InAppUtils.inAppWasShownWith(in: inApp) { inApp, error in
            //did expired
        } didShowMoreThanOnce: { inApp, error in
            //show more than x times
        } didClickOut: { inApp, error in
            //click more than x times
        } onSuccess: {
            //show inApp
        }
    }
} errorLoad: { error in
    //Show error
}
[[[InAppHandler alloc]init] getInApp:inAppId success:^(NSString *content, INInApp *inApp) {
    if (inApp.properties.dismissForever &&
        [InAppUtils isInAppDismissForever:inApp]){
        //Dissmis Forever
    } else {
        [InAppUtils inAppWasShownWithInApp:inApp didExpired:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
            //did expired
        } didShowMoreThanOnce:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
            //show more than x times
        } didClickOut:^(INInApp * _Nonnull inApp, INError * _Nonnull error) {
            //click more than x times
        } onSuccess:^{
            //show inApp
        }];
    }
} errorLoad:^(INError *error) {
    //Show error
}];
InAppUtils.inAppWasGot("YOUR_BANNER_CODE") { inApp, error in
    //did expired
} didFound: { inApp in
    //do something
} notFound: {
    InAppHandler.getInApp("YOUR_BANNER_CODE") { inApp in
      //do something        
        } errorLoad: { error in
      //do something            
        }
} didDismissForever: { inApp, error in
    //do something
} didShowManyTimes: { inApp, error in
    //do something
} didClickOut: { inApp, error in
    //do something
}
[InAppUtils inAppWasGot:@"YOUR_BANNER_CODE"  didExpired:^(INInApp * _Nonnull inApp, INInAppError * _Nonnull error) {
    //do something
} didFound:^(INInApp * _Nonnull inApp) {
    //do something
} notFound:^{
    [InAppHandler getInApp:@"YOUR_BANNER_CODE" success:^(INInApp * _Nonnull inApp) {
                //do something
    } errorLoad:^(INError * _Nonnull error) {
                //do something
    }];
} didDismissForever:^(INInApp * _Nonnull inApp, INInAppError * _Nonnull error) {
   //do something
} didShowManyTimes:^(INInApp * _Nonnull inApp, INInAppError * _Nonnull error) {
    //do something
} didClickOut:^(INInApp * _Nonnull inApp, INInAppError * _Nonnull error) {
    //do something
}];

Actions to count clicks or to not show InApp anymore

For the case of what we call Dismiss Forever, once the action is performed, this method must be called:

InAppUtils.addNewInApp(toDismissForever: inApp)
[InAppUtils addNewInAppToDismissForever: inApp];
InAppUtils.addNewInApp(inApp)
[InAppUtils addNewInApp:inApp];

To send the statistics in the event that the inApp has been clicked and clicks out control:

InAppUtils.inAppWasTappedWith(inApp)
[InAppUtils inAppWasTappedWithInApp: inApp];