HIVE SDK for iOS

HIVEPromotion.h
Go to the documentation of this file.
1 
15 #import <Foundation/Foundation.h>
16 
17 @class HIVEResultAPI;
18 
26 typedef enum {
29  kHIVEPromotionViewResultTypeStartPlayback,
30  kHIVEPromotionViewResultTypeFinishPlayback,
32 
40 typedef enum {
46 
54 typedef enum{
60 
70 typedef enum {
76 
77 
85 typedef NS_ENUM(NSUInteger, HIVEOfferwallState) {
86  kHIVEOfferwallStateEnabled = 0,
87  kHIVEOfferwallStateDisabled,
88  kHIVEOfferwallStateUnknown,
89 };
90 
98 typedef NS_ENUM(NSInteger, HIVEPromotionCampaignType) {
99  kHIVEPromotionCampaignTypeEvent = 0,
100  kHIVEPromotionCampaignTypeNotice,
101 };
102 
110 typedef NS_ENUM(NSInteger, HIVEPromotionBannerType) {
111  kHIVEPromotionBannerTypeGreat = 0,
112  kHIVEPromotionBannerTypeSmall,
113  kHIVEPromotionBannerTypeRolling,
114 };
115 
116 #pragma mark - HIVEPromotion Models
117 
124 @interface HIVEPromotionBadge : NSObject <NSCopying>
125 
134 @property (nonatomic, readonly) HIVEPromotionBadgeTarget target;
135 @property (nonatomic, strong, readonly) NSString *contentsKey;
136 @property (nonatomic, strong, readonly) NSString *badgeType;
137 
138 + (instancetype)badgeWithTarget:(HIVEPromotionBadgeTarget)target contents:(NSString *)key badge:(NSString *)type;
139 - (NSString *)toJson;
140 
141 @end
142 
150 @interface HIVEPromotionBanner : NSObject <NSCopying>
151 
152 @property (nonatomic, readonly) NSInteger pid;
153 @property (nonatomic, strong, readonly) NSString* imageUrl;
154 @property (nonatomic, strong, readonly) NSString* linkUrl;
155 @property (nonatomic, strong, readonly) NSString* displayStartDate;
156 @property (nonatomic, strong, readonly) NSString* displayEndDate;
157 @property (nonatomic, readonly) NSInteger utcStartDate;
158 @property (nonatomic, readonly) NSInteger utcEndDate;
159 @property (nonatomic, strong, readonly) NSString* typeLink;
160 @property (nonatomic, strong, readonly) NSString* typeBanner;
161 
162 + (instancetype)initWithData:(NSDictionary *)data;
163 - (NSString*)toJson;
164 
165 @end
166 
167 
177 @interface HIVEPromotionViewInfo : NSObject <NSCopying>
178 
183 @property (nonatomic, strong, readonly) NSString *url;
184 @property (nonatomic, strong, readonly) NSString *postString;
185 
186 + (instancetype)infoWithResponse:(NSDictionary *)data;
187 - (NSString *)toJson;
188 
189 @end
190 
191 
206 
207 
220 typedef void (^HIVEPromotionInfoHandler)(HIVEResultAPI *result, NSArray<HIVEPromotionViewInfo *> *viewInfos);
221 
234 typedef void (^HIVEPromotionBadgeHandler)(HIVEResultAPI *result, NSArray<HIVEPromotionBadge *> *badgeInfos);
235 
243 typedef void (^HIVEPromotionBannerInfoHandler)(HIVEResultAPI *result, NSArray<HIVEPromotionBanner *> *bannerInfos);
244 
245 
254 typedef void (^HIVEPromotionShareHandler)(HIVEResultAPI *result);
255 
256 
257 #pragma mark - HIVEAppInvitation Models
258 
261 
262 
271 @interface HIVEAppInvitationData : NSObject <NSCopying>
272 
273 @property (nonatomic, copy) NSData *qrcode;
274 
275 @property (nonatomic, copy) NSString *inviteCommonLink;
276 @property (nonatomic, copy) NSString *inviteHivemsgLink;
277 @property (nonatomic, copy) NSString *inviteFacebookLink;
278 @property (nonatomic, copy) NSString *inviteMessage;
279 @property (nonatomic, copy) NSArray<HIVEAppInvitationCampaign *> *eachCampaigns;
280 @property (nonatomic, copy) NSArray<HIVEAppInvitationCampaignStage *> *stageCampaigns;
281 
282 @property (nonatomic, copy) NSString *originalJson;
283 
284 + (instancetype)infoWithData:(NSDictionary *)data;
285 - (NSString *)toJson;
286 
287 @end
288 
289 
301 @interface HIVEAppInvitationCampaign : NSObject <NSCopying>
302 
303 @property (nonatomic, copy) NSString *title;
304 @property (nonatomic, copy) NSString *desc;
305 @property (nonatomic, copy) NSString *imgURL;
306 
307 @property (nonatomic, copy) NSDictionary *item;
308 
309 @property (nonatomic) NSInteger count;
310 @property (nonatomic) NSInteger limit;
311 
312 + (instancetype)campaignWithData:(NSDictionary *)data;
313 - (NSString *)toJson;
314 
315 @end
316 
317 
329 @interface HIVEAppInvitationCampaignStage : HIVEAppInvitationCampaign
330 
331 @property (nonatomic) NSInteger goalCount;
332 @property (nonatomic) NSInteger goalTotal;
333 
334 
335 + (instancetype)campaignWithData:(NSDictionary *)data;
336 - (NSString *)toJson;
337 
338 @end
339 
352 typedef void (^HIVEAppInvitationDataHandler)(HIVEResultAPI *result, HIVEAppInvitationData *invitationData);
353 
354 
355 
356 #pragma mark - HIVEUserEngagement Models
357 
367 typedef NS_ENUM(NSUInteger, HIVEEngagementEventType) {
368  kHIVEEngagementEventType = 0,
369 
370  kHIVEEngagementEventTypePromotionView = 1,
371  kHIVEEngagementEventTypeOfferwallView = 2,
372  kHIVEEngagementEventTypeUserAcquistion = 3,
373  kHIVEEngagementEventTypeCoupon = 4,
374 
375  kHIVEEngagementEventTypeAuthLoginView = 5,
376 
377  kHIVEEngagementEventTypeSocialCafeView = 6,
378  kHIVEEngagementEventTypeSocialInquiryView = 7,
379  kHIVEEngagementEventTypeSocialInvitation = 8,
380  kHIVEEngagementEventTypeSocialMessage = 9,
381 
382  kHIVEEngagementEventTypeEvent = 10,
383 
384 
385  kHIVEEngagementEventTypeIapPurchase = 12,
386  kHIVEEngagementEventTypeIapPromote = 13,
387  // #8017 added.
388  kHIVEEngagementEventTypePromotionCompanion = 14
389 };
390 
391 
401 typedef NS_ENUM(NSUInteger, HIVEEngagementEventState) {
402  kHIVEEngagementStateBegin = 0,
403  kHIVEEngagementStateFinish = 1,
404  kHIVEEngagementStateEventStart = 2,
405  kHIVEEngagementStateEventEnd = 3,
406 };
407 
408 
428 typedef void (^HIVEEngagementHandler)(HIVEResultAPI *result, HIVEEngagementEventType engagementEventType, HIVEEngagementEventState engagementState, NSDictionary *param);
429 
430 
431 #pragma mark - HIVEPromotion Interface
432 
442 @interface HIVEPromotion : NSObject
443 
469 + (void)showPromotion:(HIVEPromotionViewType)type isForced:(BOOL)isForced handler:(HIVEPromotionViewHandler)handler;
470 
484 + (void)showCustomContents:(HIVEPromotionCustomType)type contents:(NSString *)key handler:(HIVEPromotionViewHandler)handler;
485 
499 + (HIVEOfferwallState)getOfferwallState;
500 
516 + (void)showOfferwall:(HIVEPromotionViewHandler)handler;
517 
518 
533 + (void)showNativeReview;
534 
548 + (void)getViewInfo:(HIVEPromotionCustomType)type contents:(NSString *)key handler:(HIVEPromotionInfoHandler)handler;
549 
562 + (void)getBadgeInfo:(HIVEPromotionBadgeHandler)handler;
563 
579 + (void)getBannerInfo:(HIVEPromotionCampaignType)campaignType bannerType:(HIVEPromotionBannerType)bannerType handler:(HIVEPromotionBannerInfoHandler)handler;
580 
600 + (void)getAppInvitationData:(HIVEAppInvitationDataHandler)handler;
601 
615 + (void)showUAShare:(NSString *)inviteMessage inviteLink:(NSString *)inviteLink handler:(HIVEPromotionShareHandler)handler;
616 
634 + (void)setAdditionalInfo:(NSString *)additionalInfo;
635 
636 
637 
638 
639 
640 #pragma mark - HIVEPromotion UserEngagement Interface
641 
658  + (HIVEResultAPI *)setEngagementReady:(BOOL)isReady;
659 
667 + (void)setEngagementHandler:(HIVEEngagementHandler)engagementHandler;
668 
686 + (BOOL)processURI:(NSURL *)URI;
687 
690 @end
void(^ HIVEAppInvitationDataHandler)(HIVEResultAPI *result, HIVEAppInvitationData *invitationData)
Returns information about request for user invite (UserAcquisition)
Definition: HIVEPromotion.h:352
Notice.
Definition: HIVEPromotion.h:44
Campaign information for invite Campaigns are data that specifies the conditions for rewarding invit...
Definition: HIVEPromotion.h:301
The target to display Custom view.
Definition: HIVEPromotion.h:73
Invite information for UserAcquisition.
Definition: HIVEPromotion.h:271
void(^ HIVEPromotionShareHandler)(HIVEResultAPI *result)
Returns HIVE UA Share information.
Definition: HIVEPromotion.h:254
News.
Definition: HIVEPromotion.h:43
Full Banner.
Definition: HIVEPromotion.h:41
typedef NS_ENUM(NSUInteger, HIVEOfferwallState)
Information of Offerwall(free charging station) button.
Definition: HIVEPromotion.h:85
void(^ HIVEPromotionBadgeHandler)(HIVEResultAPI *result, NSArray< HIVEPromotionBadge *> *badgeInfos)
Returns HIVE Promotion badge information.
Definition: HIVEPromotion.h:234
Customized View.
Definition: HIVEPromotion.h:55
void(^ HIVEPromotionBannerInfoHandler)(HIVEResultAPI *result, NSArray< HIVEPromotionBanner *> *bannerInfos)
HIVE Promotion banner information.
Definition: HIVEPromotion.h:243
When the Promotion View window is closed.
Definition: HIVEPromotion.h:28
Badge information to inform users that new promotions are registered.
Definition: HIVEPromotion.h:124
void(^ HIVEEngagementHandler)(HIVEResultAPI *result, HIVEEngagementEventType engagementEventType, HIVEEngagementEventState engagementState, NSDictionary *param)
An event listener for the SDK to engage clients in certain conditions.
Definition: HIVEPromotion.h:428
The target to display Notice.
Definition: HIVEPromotion.h:72
The target to display Custom board.
Definition: HIVEPromotion.h:74
API 호출에 대한 결과를 담는 클래스
Definition: HIVEResultAPI.h:25
HIVEPromotionViewResultType
Promotion view event types.
Definition: HIVEPromotion.h:26
Customized Board.
Definition: HIVEPromotion.h:56
void(^ HIVEPromotionInfoHandler)(HIVEResultAPI *result, NSArray< HIVEPromotionViewInfo *> *viewInfos)
Returns HIVE Promotion Webview information so that your UI of webview is configured according to the ...
Definition: HIVEPromotion.h:220
void(^ HIVEPromotionViewHandler)(HIVEResultAPI *result, HIVEPromotionViewResultType type)
Promotion View API Result.
Definition: HIVEPromotion.h:205
Campaign information for invitation Campaigns are data that specifies the conditions for rewarding i...
Definition: HIVEPromotion.h:329
Full Banner.
Definition: HIVEPromotion.h:42
HIVEPromotionBadgeTarget
Information on which promotional badge is displayed If NOTICE, it should indicate the badge related ...
Definition: HIVEPromotion.h:70
HIVEPromotionCustomType
Types of Promotion CustomView.
Definition: HIVEPromotion.h:54
When the Promotion View window opens.
Definition: HIVEPromotion.h:27
HIVEPromotionViewType
Types of Promotion view.
Definition: HIVEPromotion.h:40
Spot Banner.
Definition: HIVEPromotion.h:57
NSString * badgeType
Types of badge (Can be "new" or "none")
Definition: HIVEPromotion.h:136
The target to display News.
Definition: HIVEPromotion.h:71
Information of Promotion webview (Information to customize your promotion Webview UI) ...
Definition: HIVEPromotion.h:177
HIVEOfferwallState getOfferwallState()
Returns whether the button is available to invoke an offerwall (free recharging station) within the g...
Definition: HIVEPromotion.m:71
Banner information for a specific promotion.
Definition: HIVEPromotion.h:150
HIVE Promotion provides you with the ability to effectively expose new news or events to the game use...
Definition: HIVEPromotion.h:442
NSString * contentsKey
Promotion unique ID registered in the backoffice in case the target is custom contents.
Definition: HIVEPromotion.h:135
HIVEPromotionBadgeTarget target
Target to mark badge For example, if NOTICE, you should mark the badge associated with the notice...
Definition: HIVEPromotion.h:134
void showNativeReview()
Show review popup Positive ratings and reviews of game users will affect other users&#39; use of the ga...
Definition: HIVEPromotion.m:115
Direct Campaign Banner.
Definition: HIVEPromotion.h:58
Copyright © GAMEVIL COM2US PLATFORM Inc. All Right Reserved. Terms of Use Privacy Policy