|
JubeatPlus 3.9.11
|
The reward SDK's stateful core singleton. More...
#include <RewardCore.h>


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. | |
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.
| - (void) allInstallFlgWithCallback: | (nullable void(^)(NSInteger flg, NSError *_Nullable error)) | callback |
Query the all-install flag asynchronously.
| callback | The completion block, called with the all-install flag and an optional error. |
| - (void) appListDidAppear: | (nullable id< ApplilinkViewDelegate >) | delegate |
Report that the advert list appeared to the SDK delegate.
| delegate | The advert delegate. |
| - (void) appListDidDisappear: | (nullable id< ApplilinkViewDelegate >) | delegate |
Report that the advert list disappeared to the SDK delegate.
| delegate | The advert delegate. |
| - (void) appListDidStart: | (nullable id< ApplilinkViewDelegate >) | delegate |
Report that the advert list started loading to the SDK delegate.
| delegate | The advert delegate. |
| - (void) appListFailLinkWithError: | (nullable NSError *) | error | |
| delegate: | (nullable id< ApplilinkViewDelegate >) | delegate |
Report a link failure to the SDK delegate.
| error | The link error. |
| delegate | The advert delegate. |
| - (void) appListFailLoadWithError: | (nullable NSError *) | error | |
| delegate: | (nullable id< ApplilinkViewDelegate >) | delegate |
Report a load failure to the SDK delegate.
| error | The load error. |
| delegate | The advert delegate. |
| - (int) campaignFlg |
The stored campaign flag for the current session.
-2 when tracking is off, the session is not initialised, or no flag is stored. | - (BOOL) canUseBannerCache |
Whether cached banner status may be used, clearing the cache when no UDID is available.
YES when any of the current, advertising, or old UDID is present. | - (void) clearAdStatus |
Clear the cached banner-display status and its expiry.
| - (void) clearInitialize |
Clear the initialisation flag, forget the stored campaign flag, and drop the reward authentication-session expiry.
| - (void) clearSession |
Clear the reward session: delete every HTTP cookie and the stored session defaults.
| - (void) closeAdScreen |
Close the reward-advert screen.
| - (void) closeNotice |
Tear down the advert web view and notify the delegate it disappeared.
Reimplemented from <SdkViewDelegate>.
| - (BOOL) createCFUdidWithError: | (NSError *_Nullable *_Nullable) | error |
Resolve, and persist to the keychain, the reward-network UDID for the stored storage index.
| error | On failure, set to the localised error; may be nullptr. |
YES on success. | - (BOOL) createUdidWithBlock: | (nullable void(^)(NSError *_Nullable error)) | block |
Create and persist the device UDID for the reward network.
| block | The completion block invoked with an error when creation fails. |
YES when the UDID was created (or already present); NO when the block was invoked with an error. | - (void) failLinkNoticeWithError: | (nullable NSError *) | error |
Notify the stored delegate of an advert link failure.
| error | The link error. |
Reimplemented from <SdkViewDelegate>.
| - (void) failOpenNoticeWithError: | (nullable NSError *) | error |
Notify the stored delegate of an advert open failure.
| error | The open error. |
Reimplemented from <SdkViewDelegate>.
| - (void) getAdDisplayStatusWithCallback: | (nullable void(^)(NSDictionary *_Nullable status, NSError *_Nullable error)) | callback |
Query the ad-display status asynchronously.
| callback | The completion block, called with the status dictionary and an optional error. |
| - (void) getAppListStatusWithBlock: | (nullable void(^)(NSInteger status, NSError *_Nullable error)) | block |
Query the app-list (reward-advert) status asynchronously.
| block | The completion block, called with the ad-status code and an optional error. |
| - (void) getInstalledAppWithCallback: | (nullable void(^)(NSArray *_Nullable appIdList, NSError *_Nullable error)) | callback |
Query the full list of advertised application identifiers.
| callback | The completion block, called with the identifier array and an optional error. |
| - (nullable id) getTemporaryCacheWithKey: | (nullable NSString *) | key |
Read a cached value from NSUserDefaults, removing it when it has expired.
| key | The cache key. |
nil when it is absent or expired. | - (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.
| parentView | The view that hosts the advert screen. |
| adLocation | The ad-location identifier. |
| requestCode | The request code forwarded to the SDK. |
| delegate | The advert-screen delegate. |
| - (void) openCancelWithError: | (nullable NSError *) | error |
Notice hook for an advert open cancellation.
The shipped build ignores the argument.
| error | The cancellation error. |
Reimplemented from <SdkViewDelegate>.
| - (void) openedNotice |
Notify the stored delegate that the advert list appeared (called by the web view).
Reimplemented from <SdkViewDelegate>.
| - (void) postInstalledAppWithCallback: | (nullable void(^)(NSError *_Nullable error)) | callback |
Post the installed companion apps discovered on the device to the reward network.
| callback | The completion block, called with an error, or nil on success. |
| - (int) redirectWithRequest: | (nullable NSURLRequest *) | request |
Handle an applilink://ext-app:80 redirect request from the reward web view.
| request | The intercepted NSURLRequest. |
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. | - (void) rotateAdScreenWithInterfaceOrientation: | (UIInterfaceOrientation) | interfaceOrientation | |
| duration: | (NSTimeInterval) | duration |
Rotate any open reward-advert screen to a new interface orientation.
| interfaceOrientation | The target UIInterfaceOrientation. |
| duration | The animation duration. |
| - (void) setNavigationBarHidden: | (BOOL) | navigationBarHidden |
Set whether the reward advert screen hides its navigation bar.
| navigationBarHidden | YES to hide the navigation bar. |
| - (void) setTemporaryCacheWithKey: | (nullable NSString *) | key | |
| value: | (nullable id) | value | |
| expiration: | (NSInteger) | expiration |
Store a value in NSUserDefaults under key with an expiry.
| key | The cache key. |
| value | The value to store. |
| expiration | The lifetime in seconds; 0 stores a one-second lifetime. |
| + (instancetype) sharedInstance |
The shared RewardCore instance (created with dispatch_once).
| - (void) showVideoViewWithQuery: | (nullable NSString *) | query |
Present a reward-video view for query through ApplilinkViewManager, hosted on the open reward web-view controller's view.
| query | The video request query. |
| - (void) startedNotice |
Notify the stored delegate that the advert list started (called by the web view).
Reimplemented from <SdkViewDelegate>.
| - (void) startSessionWithBlock: | (nullable void(^)(NSError *_Nullable error)) | block |
Ensure a valid reward authentication session, regenerating and re-logging in when needed.
| block | The completion block invoked with an error, or nil on success. |
| - (void) startWithBlock: | (nullable void(^)(NSError *_Nullable error)) | block |
Start the session (via startWithCallback:), refreshing the reward auth session after.
| block | The completion block invoked with an error, or nil on success. |
| - (void) startWithCallback: | (nullable void(^)(NSError *_Nullable error)) | callback |
Create the device UDID, then post the application-install event, initialising the session.
| callback | The completion block invoked with an error, or nil on success. |
|
readwritenonatomicweak |
The Applilink delegate that receives advert lifecycle and failure callbacks.
|
readwritenonatomiccopy |
The request parameters for the advert currently being opened.
|
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.
|
readwritenonatomicassign |
Whether the reward advert screen hides its navigation bar.
|
readwritenonatomicstrong |
The hosted reward advert web-view controller, created lazily on first open.