JubeatPlus 3.9.11
Loading...
Searching...
No Matches
RewardCore Class Reference

The reward SDK's stateful core singleton. More...

#include <RewardCore.h>

Inheritance diagram for RewardCore:
Collaboration diagram for RewardCore:

Instance Methods

(void) - clearInitialize
 Clear the initialisation flag, forget the stored campaign flag, and drop the reward authentication-session expiry.
(int) - campaignFlg
 The stored campaign flag for the current session.
(void) - startWithCallback:
 Create the device UDID, then post the application-install event, initialising the session.
(void) - startSessionWithBlock:
 Ensure a valid reward authentication session, regenerating and re-logging in when needed.
(void) - startWithBlock:
 Start the session (via startWithCallback:), refreshing the reward auth session after.
(BOOL) - createUdidWithBlock:
 Create and persist the device UDID for the reward network.
(BOOL) - createCFUdidWithError:
 Resolve, and persist to the keychain, the reward-network UDID for the stored storage index.
(void) - allInstallFlgWithCallback:
 Query the all-install flag asynchronously.
(void) - getAdDisplayStatusWithCallback:
 Query the ad-display status asynchronously.
(void) - postInstalledAppWithCallback:
 Post the installed companion apps discovered on the device to the reward network.
(void) - getInstalledAppWithCallback:
 Query the full list of advertised application identifiers.
(void) - getAppListStatusWithBlock:
 Query the app-list (reward-advert) status asynchronously.
(void) - openAdScreenWithParentView:adLocation:requestCode:delegate:
 Open the reward-advert screen inside parentView at adLocation, reporting to delegate.
(void) - closeAdScreen
 Close the reward-advert screen.
(void) - rotateAdScreenWithInterfaceOrientation:duration:
 Rotate any open reward-advert screen to a new interface orientation.
(void) - showVideoViewWithQuery:
 Present a reward-video view for query through ApplilinkViewManager, hosted on the open reward web-view controller's view.
(int) - redirectWithRequest:
 Handle an applilink://ext-app:80 redirect request from the reward web view.
(void) - setNavigationBarHidden:
 Set whether the reward advert screen hides its navigation bar.
(void) - setTemporaryCacheWithKey:value:expiration:
 Store a value in NSUserDefaults under key with an expiry.
(nullable id) - getTemporaryCacheWithKey:
 Read a cached value from NSUserDefaults, removing it when it has expired.
(void) - appListDidStart:
 Report that the advert list started loading to the SDK delegate.
(void) - appListDidAppear:
 Report that the advert list appeared to the SDK delegate.
(void) - appListDidDisappear:
 Report that the advert list disappeared to the SDK delegate.
(void) - appListFailLoadWithError:delegate:
 Report a load failure to the SDK delegate.
(void) - appListFailLinkWithError:delegate:
 Report a link failure to the SDK delegate.
(void) - startedNotice
 Notify the stored delegate that the advert list started (called by the web view).
(void) - openedNotice
 Notify the stored delegate that the advert list appeared (called by the web view).
(void) - closeNotice
 Tear down the advert web view and notify the delegate it disappeared.
(void) - failOpenNoticeWithError:
 Notify the stored delegate of an advert open failure.
(void) - failLinkNoticeWithError:
 Notify the stored delegate of an advert link failure.
(void) - openCancelWithError:
 Notice hook for an advert open cancellation.
(BOOL) - canUseBannerCache
 Whether cached banner status may be used, clearing the cache when no UDID is available.
(void) - clearAdStatus
 Clear the cached banner-display status and its expiry.
(void) - clearSession
 Clear the reward session: delete every HTTP cookie and the stored session defaults.
Instance Methods inherited from <SdkViewDelegate>
(void) - closeNotice:
 An ApplilinkWebView "close" link was followed.
(void) - viewReady:
 An ApplilinkWebView finished loading and is ready.
(void) - repeatNotice:
 An ApplilinkWebView "repeat" link was followed.
(void) - storeNotice:
 An ApplilinkWebView "store" link was followed.
(void) - linkErrorNotice:error:
 An ApplilinkWebView load error occurred.
(void) - appStoreOpenedNoticeWithAppParam:
 The App Store product page opened.
(void) - appStoreCloseNoticeWithAppParam:
 The App Store product page is about to close.
(void) - appStoreClosedNoticeWithAppParam:
 The App Store product page closed.
(void) - appStoreFailLoadNoticeWithError:appParam:
 An App Store product-page load failed.
(void) - appStoreTransitionNoticeWithAppParam:
 The App Store product page transitioned.

Class Methods

(instancetype) + sharedInstance
 The shared RewardCore instance (created with dispatch_once).

Properties

int initializeFlg
 The SDK initialisation flag: non-zero once the install record has been posted.
BOOL isNavigationBarHidden
 Whether the reward advert screen hides its navigation bar.
RewardWebViewController * rewardViewController
 The hosted reward advert web-view controller, created lazily on first open.
id< ApplilinkViewDelegate > applilinkDelegate
 The Applilink delegate that receives advert lifecycle and failure callbacks.
ApplilinkParameters * applilinkParams
 The request parameters for the advert currently being opened.

Detailed Description

The reward SDK's stateful core singleton.

Acts as the hosted RewardWebViewController 's SdkViewDelegate, implementing the advert lifecycle and failure callbacks it forwards on to the Applilink delegate.

Method Documentation

◆ allInstallFlgWithCallback:

- (void) allInstallFlgWithCallback: (nullable void(^)(NSInteger flg, NSError *_Nullable error)) callback

Query the all-install flag asynchronously.

Parameters
callbackThe completion block, called with the all-install flag and an optional error.
Ghidra address:
0x2326cc

◆ appListDidAppear:

- (void) appListDidAppear: (nullable id< ApplilinkViewDelegate >) delegate

Report that the advert list appeared to the SDK delegate.

Parameters
delegateThe advert delegate.
Ghidra address:
0x23561c

◆ appListDidDisappear:

- (void) appListDidDisappear: (nullable id< ApplilinkViewDelegate >) delegate

Report that the advert list disappeared to the SDK delegate.

Parameters
delegateThe advert delegate.
Ghidra address:
0x235648

◆ appListDidStart:

- (void) appListDidStart: (nullable id< ApplilinkViewDelegate >) delegate

Report that the advert list started loading to the SDK delegate.

Parameters
delegateThe advert delegate.
Ghidra address:
0x2355f0

◆ appListFailLinkWithError:delegate:

- (void) appListFailLinkWithError: (nullable NSError *) error
delegate: (nullable id< ApplilinkViewDelegate >) delegate 

Report a link failure to the SDK delegate.

Parameters
errorThe link error.
delegateThe advert delegate.
Ghidra address:
0x2356d8

◆ appListFailLoadWithError:delegate:

- (void) appListFailLoadWithError: (nullable NSError *) error
delegate: (nullable id< ApplilinkViewDelegate >) delegate 

Report a load failure to the SDK delegate.

Parameters
errorThe load error.
delegateThe advert delegate.
Ghidra address:
0x235674

◆ campaignFlg

- (int) campaignFlg

The stored campaign flag for the current session.

Returns
The campaign flag, or -2 when tracking is off, the session is not initialised, or no flag is stored.
Ghidra address:
0x23163c

◆ canUseBannerCache

- (BOOL) canUseBannerCache

Whether cached banner status may be used, clearing the cache when no UDID is available.

Returns
YES when any of the current, advertising, or old UDID is present.
Ghidra address:
0x23594c

◆ clearAdStatus

- (void) clearAdStatus

Clear the cached banner-display status and its expiry.

Ghidra address:
0x235a28

◆ clearInitialize

- (void) clearInitialize

Clear the initialisation flag, forget the stored campaign flag, and drop the reward authentication-session expiry.

Ghidra address:
0x231588

◆ clearSession

- (void) clearSession

Clear the reward session: delete every HTTP cookie and the stored session defaults.

Ghidra address:
0x235a5c

◆ closeAdScreen

- (void) closeAdScreen

Close the reward-advert screen.

Ghidra address:
0x2346fc

◆ closeNotice

- (void) closeNotice

Tear down the advert web view and notify the delegate it disappeared.

Ghidra address:
0x2357d4

Reimplemented from <SdkViewDelegate>.

◆ createCFUdidWithError:

- (BOOL) createCFUdidWithError: (NSError *_Nullable *_Nullable) error

Resolve, and persist to the keychain, the reward-network UDID for the stored storage index.

Parameters
errorOn failure, set to the localised error; may be nullptr.
Returns
YES on success.
Ghidra address:
0x2323bc

◆ createUdidWithBlock:

- (BOOL) createUdidWithBlock: (nullable void(^)(NSError *_Nullable error)) block

Create and persist the device UDID for the reward network.

Parameters
blockThe completion block invoked with an error when creation fails.
Returns
YES when the UDID was created (or already present); NO when the block was invoked with an error.
Ghidra address:
0x232214

◆ failLinkNoticeWithError:

- (void) failLinkNoticeWithError: (nullable NSError *) error

Notify the stored delegate of an advert link failure.

Parameters
errorThe link error.
Ghidra address:
0x2358d8

Reimplemented from <SdkViewDelegate>.

◆ failOpenNoticeWithError:

- (void) failOpenNoticeWithError: (nullable NSError *) error

Notify the stored delegate of an advert open failure.

Parameters
errorThe open error.
Ghidra address:
0x235868

Reimplemented from <SdkViewDelegate>.

◆ getAdDisplayStatusWithCallback:

- (void) getAdDisplayStatusWithCallback: (nullable void(^)(NSDictionary *_Nullable status, NSError *_Nullable error)) callback

Query the ad-display status asynchronously.

Parameters
callbackThe completion block, called with the status dictionary and an optional error.
Ghidra address:
0x232924

◆ getAppListStatusWithBlock:

- (void) getAppListStatusWithBlock: (nullable void(^)(NSInteger status, NSError *_Nullable error)) block

Query the app-list (reward-advert) status asynchronously.

Parameters
blockThe completion block, called with the ad-status code and an optional error.
Ghidra address:
0x233568

◆ getInstalledAppWithCallback:

- (void) getInstalledAppWithCallback: (nullable void(^)(NSArray *_Nullable appIdList, NSError *_Nullable error)) callback

Query the full list of advertised application identifiers.

Parameters
callbackThe completion block, called with the identifier array and an optional error.
Ghidra address:
0x23320c

◆ getTemporaryCacheWithKey:

- (nullable id) getTemporaryCacheWithKey: (nullable NSString *) key

Read a cached value from NSUserDefaults, removing it when it has expired.

Parameters
keyThe cache key.
Returns
The cached value, or nil when it is absent or expired.
Ghidra address:
0x2353fc

◆ openAdScreenWithParentView:adLocation:requestCode:delegate:

- (void) openAdScreenWithParentView: (nullable UIView *) parentView
adLocation: (nullable NSString *) adLocation
requestCode: (nullable id) requestCode
delegate: (nullable id< ApplilinkViewDelegate >) delegate 

Open the reward-advert screen inside parentView at adLocation, reporting to delegate.

Parameters
parentViewThe view that hosts the advert screen.
adLocationThe ad-location identifier.
requestCodeThe request code forwarded to the SDK.
delegateThe advert-screen delegate.
Ghidra address:
0x233bc4

◆ openCancelWithError:

- (void) openCancelWithError: (nullable NSError *) error

Notice hook for an advert open cancellation.

The shipped build ignores the argument.

Parameters
errorThe cancellation error.
Ghidra address:
0x235948

Reimplemented from <SdkViewDelegate>.

◆ openedNotice

- (void) openedNotice

Notify the stored delegate that the advert list appeared (called by the web view).

Ghidra address:
0x235788

Reimplemented from <SdkViewDelegate>.

◆ postInstalledAppWithCallback:

- (void) postInstalledAppWithCallback: (nullable void(^)(NSError *_Nullable error)) callback

Post the installed companion apps discovered on the device to the reward network.

Parameters
callbackThe completion block, called with an error, or nil on success.
Ghidra address:
0x232d2c

◆ redirectWithRequest:

- (int) redirectWithRequest: (nullable NSURLRequest *) request

Handle an applilink://ext-app:80 redirect request from the reward web view.

Parameters
requestThe intercepted NSURLRequest.
Returns
1 when the request is not an Applilink redirect, has no route, or the route was not resolved; 0 when a path-segment URL was opened; 3 when a default_scheme URL was opened; 4 when an app-store redirect was shown; or 7 for a recognised close route.
Ghidra address:
0x2348e8

◆ rotateAdScreenWithInterfaceOrientation:duration:

- (void) rotateAdScreenWithInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation
duration: (NSTimeInterval) duration 

Rotate any open reward-advert screen to a new interface orientation.

Parameters
interfaceOrientationThe target UIInterfaceOrientation.
durationThe animation duration.
Ghidra address:
0x2347b4

◆ setNavigationBarHidden:

- (void) setNavigationBarHidden: (BOOL) navigationBarHidden

Set whether the reward advert screen hides its navigation bar.

Parameters
navigationBarHiddenYES to hide the navigation bar.
Ghidra address:
0x235238

◆ setTemporaryCacheWithKey:value:expiration:

- (void) setTemporaryCacheWithKey: (nullable NSString *) key
value: (nullable id) value
expiration: (NSInteger) expiration 

Store a value in NSUserDefaults under key with an expiry.

Parameters
keyThe cache key.
valueThe value to store.
expirationThe lifetime in seconds; 0 stores a one-second lifetime.
Ghidra address:
0x235248

◆ sharedInstance

+ (instancetype) sharedInstance

The shared RewardCore instance (created with dispatch_once).

Returns
The shared instance.
Ghidra address:
0x23148c
Ghidra address:
0x2314d0

◆ showVideoViewWithQuery:

- (void) showVideoViewWithQuery: (nullable NSString *) query

Present a reward-video view for query through ApplilinkViewManager, hosted on the open reward web-view controller's view.

Parameters
queryThe video request query.
Ghidra address:
0x2347d8

◆ startedNotice

- (void) startedNotice

Notify the stored delegate that the advert list started (called by the web view).

Ghidra address:
0x23573c

Reimplemented from <SdkViewDelegate>.

◆ startSessionWithBlock:

- (void) startSessionWithBlock: (nullable void(^)(NSError *_Nullable error)) block

Ensure a valid reward authentication session, regenerating and re-logging in when needed.

Parameters
blockThe completion block invoked with an error, or nil on success.
Ghidra address:
0x231be8

◆ startWithBlock:

- (void) startWithBlock: (nullable void(^)(NSError *_Nullable error)) block

Start the session (via startWithCallback:), refreshing the reward auth session after.

Parameters
blockThe completion block invoked with an error, or nil on success.
Ghidra address:
0x232100

◆ startWithCallback:

- (void) startWithCallback: (nullable void(^)(NSError *_Nullable error)) callback

Create the device UDID, then post the application-install event, initialising the session.

Parameters
callbackThe completion block invoked with an error, or nil on success.
Ghidra address:
0x231740

Property Documentation

◆ applilinkDelegate

- (id<ApplilinkViewDelegate>) applilinkDelegate
readwritenonatomicweak

The Applilink delegate that receives advert lifecycle and failure callbacks.

Ghidra address:
0x235d44

◆ applilinkParams

- (ApplilinkParameters*) applilinkParams
readwritenonatomiccopy

The request parameters for the advert currently being opened.

Ghidra address:
0x235d78

◆ initializeFlg

- (int) initializeFlg
readwritenonatomicassign

The SDK initialisation flag: non-zero once the install record has been posted.

The getter is overridden to return 0 whenever advertising tracking is disabled, regardless of the stored value.

Ghidra address:
0x23153c

◆ isNavigationBarHidden

- (BOOL) isNavigationBarHidden
readwritenonatomicassign

Whether the reward advert screen hides its navigation bar.

Ghidra address:
0x235cdc

◆ rewardViewController

- (RewardWebViewController*) rewardViewController
readwritenonatomicstrong

The hosted reward advert web-view controller, created lazily on first open.

Ghidra address:
0x235cfc

The documentation for this class was generated from the following files: