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

INInAppHandler.init().getInApp(inAppId) { content, inApp in
    //DO SOMETHING
} errorLoad: { error in
    //Show error
}
[[[INInAppHandler alloc]init] getInApp:inAppId success:^(NSString *content, INInApp *inApp) {
    //DO SOMETHING
} errorLoad:^(INError *error) {
    //Show error
}];
INInAppHandler.getInApp("YOUR_BANNER_CODE") { inApp in
    //do something        
} errorLoad: { error in
    //do something            
}
[INInAppHandler 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:

INInAppUtils.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
}
[INInAppUtils 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:

INInAppUtils.addNewInApp(inApp)
INEventUtils.eventPrintInAppRequest(inApp);
[INInAppUtils addNewInApp:inApp];
[INEventUtils eventPrintInAppRequest:inApp];

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

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

InApp info errors

List of all possible errors from inApp, and messages from callbacks:

    INAPP_ERROR = 2000 -> "InApp error"
    INAPP_NOT_APPKEY = 2002 -> "AppKey was not configurated"
    INAPP_CONTENT_MESSAGE = 2003 -> "InApp error with content"
    INAPP_TOPIC_EMPTY = 2004 -> "There is no inApp topic subscription"
    INAPP_CAMPAIGN_NOT_EXIST = 2403 -> "Campaign doesn't exist with the code"
    INAPP_SHOW_INAPP_ERROR = 2100 -> "Show inApp error"
    INAPP_POPUP_ERROR = 2200 -> "Popup error"
    INAPP_SHOW_POPUP_ERROR = 2300 -> "Show popup error"
    INAPP_WAS_EXPIRED = 2101 -> "InApp was cache expired"
    INAPP_WAS_SHOWN_MANY_TIMES = 2102 -> "InApp was shown many times"
    INAPP_WAS_CLICKED_MANY_TIMES = 2103 -> "InApp was clicked many times"
    INAPP_FORM_TYPE_NOT_CORRECT = 2120 -> "Input type is not correct"
    INAPP_FORM_FIELD_IS_EMPTY = 2121 -> "Field is empty"
    POPUP_WAS_EXPIRED = 2301 -> "Popup was cache expired"
    POPUP_WAS_SHOWN_MANY_TIMES = 2302 -> "Popup was shown many times"
    POPUP_WAS_CLICKED_MANY_TIMES = 2303 -> "Popup was clicked many times"
    POPUP_DISMISSED_FOREVER = 2304 -> "Popup was dismissed forever"