JubeatPlus 3.9.11
Loading...
Searching...
No Matches
RewardCore.h
Go to the documentation of this file.
1
24
25#import <UIKit/UIKit.h>
26
27#import "ApplilinkStore.h"
29
32
33NS_ASSUME_NONNULL_BEGIN
34
41@interface RewardCore : NSObject <SdkViewDelegate>
42
50@property(nonatomic, assign) int initializeFlg;
51
56@property(nonatomic, assign) BOOL isNavigationBarHidden;
57
62@property(nonatomic, strong, nullable) RewardWebViewController *rewardViewController;
63
68@property(nonatomic, weak, nullable) id<ApplilinkViewDelegate> applilinkDelegate;
69
74@property(nonatomic, copy, nullable) ApplilinkParameters *applilinkParams;
75
81+ (instancetype)sharedInstance;
82
83#pragma mark Session lifecycle
84
90- (void)clearInitialize;
91
98- (int)campaignFlg;
99
105- (void)startWithCallback:(nullable void (^)(NSError *_Nullable error))callback;
106
112- (void)startSessionWithBlock:(nullable void (^)(NSError *_Nullable error))block;
113
119- (void)startWithBlock:(nullable void (^)(NSError *_Nullable error))block;
120
128- (BOOL)createUdidWithBlock:(nullable void (^)(NSError *_Nullable error))block;
129
137- (BOOL)createCFUdidWithError:(NSError *_Nullable *_Nullable)error;
138
139#pragma mark Status queries
140
146- (void)allInstallFlgWithCallback:(nullable void (^)(NSInteger flg,
147 NSError *_Nullable error))callback;
148
154- (void)getAdDisplayStatusWithCallback:(nullable void (^)(NSDictionary *_Nullable status,
155 NSError *_Nullable error))callback;
156
162- (void)postInstalledAppWithCallback:(nullable void (^)(NSError *_Nullable error))callback;
163
169- (void)getInstalledAppWithCallback:(nullable void (^)(NSArray *_Nullable appIdList,
170 NSError *_Nullable error))callback;
171
177- (void)getAppListStatusWithBlock:(nullable void (^)(NSInteger status,
178 NSError *_Nullable error))block;
179
180#pragma mark Advert screen
181
191- (void)openAdScreenWithParentView:(nullable UIView *)parentView
192 adLocation:(nullable NSString *)adLocation
193 requestCode:(nullable id)requestCode
194 delegate:(nullable id<ApplilinkViewDelegate>)delegate;
195
200- (void)closeAdScreen;
201
208- (void)rotateAdScreenWithInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
209 duration:(NSTimeInterval)duration;
210
217- (void)showVideoViewWithQuery:(nullable NSString *)query;
218
227- (int)redirectWithRequest:(nullable NSURLRequest *)request;
228
234- (void)setNavigationBarHidden:(BOOL)navigationBarHidden;
235
236#pragma mark Temporary cache
237
245- (void)setTemporaryCacheWithKey:(nullable NSString *)key
246 value:(nullable id)value
247 expiration:(NSInteger)expiration;
248
255- (nullable id)getTemporaryCacheWithKey:(nullable NSString *)key;
256
257#pragma mark Delegate notifications
258
264- (void)appListDidStart:(nullable id<ApplilinkViewDelegate>)delegate;
265
271- (void)appListDidAppear:(nullable id<ApplilinkViewDelegate>)delegate;
272
278- (void)appListDidDisappear:(nullable id<ApplilinkViewDelegate>)delegate;
279
286- (void)appListFailLoadWithError:(nullable NSError *)error
287 delegate:(nullable id<ApplilinkViewDelegate>)delegate;
288
295- (void)appListFailLinkWithError:(nullable NSError *)error
296 delegate:(nullable id<ApplilinkViewDelegate>)delegate;
297
298#pragma mark Web-view notices
299
304- (void)startedNotice;
305
310- (void)openedNotice;
311
316- (void)closeNotice;
317
323- (void)failOpenNoticeWithError:(nullable NSError *)error;
324
330- (void)failLinkNoticeWithError:(nullable NSError *)error;
331
337- (void)openCancelWithError:(nullable NSError *)error;
338
339#pragma mark Cache and session teardown
340
346- (BOOL)canUseBannerCache;
347
352- (void)clearAdStatus;
353
358- (void)clearSession;
359
360@end
361
362NS_ASSUME_NONNULL_END
363
364// code: language=Objective-C
365// kate: hl Objective-C;
366// vim: set ft=objc :
The applilink SDK's App Store product-page facade singleton.
The applilink advert-view delegate protocol.
Carries one advert request's model, location, alignment and caller request code.
Definition ApplilinkParameters.h:21
The reward SDK's stateful core singleton.
Definition RewardCore.h:41
void closeNotice()
Tear down the advert web view and notify the delegate it disappeared.
Definition RewardCore.m:842
int initializeFlg
The SDK initialisation flag: non-zero once the install record has been posted.
Definition RewardCore.m:175
void clearAdStatus()
Clear the cached banner-display status and its expiry.
Definition RewardCore.m:882
id< ApplilinkViewDelegate > applilinkDelegate
The Applilink delegate that receives advert lifecycle and failure callbacks.
Definition RewardCore.h:68
BOOL canUseBannerCache()
Whether cached banner status may be used, clearing the cache when no UDID is available.
Definition RewardCore.m:870
instancetype sharedInstance()
The shared RewardCore instance (created with dispatch_once).
Definition RewardCore.m:132
RewardWebViewController * rewardViewController
The hosted reward advert web-view controller, created lazily on first open.
Definition RewardCore.h:62
void clearInitialize()
Clear the initialisation flag, forget the stored campaign flag, and drop the reward authentication-se...
Definition RewardCore.m:191
void startedNotice()
Notify the stored delegate that the advert list started (called by the web view).
Definition RewardCore.m:832
int campaignFlg()
The stored campaign flag for the current session.
Definition RewardCore.m:199
void closeAdScreen()
Close the reward-advert screen.
Definition RewardCore.m:657
BOOL isNavigationBarHidden
Whether the reward advert screen hides its navigation bar.
Definition RewardCore.h:56
ApplilinkParameters * applilinkParams
The request parameters for the advert currently being opened.
Definition RewardCore.h:74
void openedNotice()
Notify the stored delegate that the advert list appeared (called by the web view).
Definition RewardCore.m:837
void clearSession()
Clear the reward session: delete every HTTP cookie and the stored session defaults.
Definition RewardCore.m:888
The in-application host controller for the reward-advert web page.
Definition RewardWebViewController.h:40
The delegate the SDK's advert, App Store, and web views all report back through.
Definition ApplilinkStore.h:27