Live Operation Notification Popup Service
Live Operation Notification Service is a service to show messages to users by popup notifications whenever needed.
News about ongoing events or new features can be informed to users by this service.
Notice
- IGAW General Integration must be set in order to integrate Live Operation add-on. [IGAW General Integration : iOS]
- In order to integrate Live Operation, LiveOps~*.framework file must be included in Xcode project. [SDK Installation : iOS]
Live Operation Notification Popup Installation
There are two ways to install the LiveOps.framework.- CocoaPods
The content of the Podfile must be as follows:
platform :ios, '8.0'
pod 'LiveOps'
- Direct Installation
After adding LiveOps.framework file, add the following Dependencies.
Adding Bundle
Add LiveOps.bundle included in LiveOps.framework.
Notification Popup Initialization API
To use the Notification Popup service, follow the following steps to initialize.
It is recommended to call the initialization API at the point when the application starts.
Input User ID
User ID is a set of information to identify users who have completed the campaign and are eligible for a reward.
User ID must be set before the user inputs the coupon codes.
Notice
- One user should only have one unique value, not variable.
- Must not contain any personal information(email, name, phone number, username).
- Must go through URL encoding if contains Korean, special character, or blank space.
- Must be set before the getPopups API is called up.
Follow the above notice when input the User ID value.
[IgaworksCore setUserId:@"user10001"];
Loading the Notification Popup Data
Call getPopups api to load the notification popup data set in the Live Operation admin page.
User ID must be set before loading the data.
Notice
- Data loading cannot be done without the user id.
- Without this data loading process, SDK cannot recognize any new notification added on the Live Operation notification popup admin page.
Follow the above notice when loading the notification popup data.
[LiveOpsPopup getPopups:^{
//This code block will be called when there is the notification popup data.
NSLog(@"Popup Resource Loading Success");
}];
Notification Popup API
Notification Popup Display
Show notifications in the popup form at a desired point by calling up the showPopups api.
The content of the notification must be set in the notification popup admin page.
The following example shows a notification popup is displayed when clicking the showPopupNotiBtn button.
#import "ViewController.h"
#import "AppDelegate.h"
#import <IgaworksCore/IgaworksCore.h>
#import <LiveOps/LiveOps.h>
@implementation ViewController
- (IBAction)showNotiPopUpBtnClicked:(UIButton *)sender {
[LiveOpsPopup showPopups:@"Notification popup space key"];
}
@end
+ Notification popup space key can be created only from the notification popup admin page.
Notification Popup Deep Link
Use the Deep Link feature of a notification popup to handle various types of actions
- Deep Link can be registered in the Live Operation Admin page.
- Deep Link supports Json type data.
Link Listener
By using the data transferred through the listener, you can open up the popup link.
[LiveOpsPopup setPopupLinkListener:^(NSString *popupSpaceKey, NSDictionary *customData) {
//The deep link data registered to the popup will be transferred through customData.
//If the popup is not in JSON deep link type, customData will be transferred as nil.
NSLog(@"popupLink listener called\n\
deep link json: %@", customData);
}];
Close Listener
By using the data transferred through the listener, you can close the popup.
[LiveOpsPopup setPopupCloseListener:^(NSString *popupSpaceKey, NSString *popupCampaignName, NSDictionary *customData, NSUInteger remainPopupNum) {
//The deep link data registered to the popup will be transferred through customData.
//If the popup is not in JSON deep link type, customData will be transferred as nil.
NSLog(@"popupClose listener called\n\
popupCampaignName: %@\n\
deep link json: %@\n\
remainPopupNum: %lu", popupCampaignName, customData, (unsigned long)remainPopupNum);
}];
Force Quitting Notification Popups
By using the following api, you can force quit the notification popups directly.
// Destroy the currently displayed popup only
[LiveOpsPopup destroyPopup];
// Destroy all the popups, including the currently displayed popup and the ones after
[LiveOpsPopup destroyAllPopups];
Targeting Notification Popup Users
Set targeting Data
//[LiveOpsUser setTargetingData:(NSString*)customUserData withKey:(NSString*)customUserDataKey]
[LiveOpsPush setTargetingData:@16 withKey:@"age"];
Import Targeting Data
NSNumber* ageNum = [LiveOpsPush getTargetingDataWithKey:@"age"];
Sync Targeting Data
[LiveOpsUser flush];