SCAdViewController
@interface SCAdViewController
SCAdViewController is the ViewController that is responsible for playing smartclip advertisement videos. The ViewController utilizes a WKWebView which uses smartclip javascript core code to execute the advertisements.
You can set SCDisablePlayerScriptUpdate to YES in your projects plist file if you want to use the javascript player that is part of this bundle. Otherwise the player will be updated automatically.
-
The target sdk listener. Set this to get informed by state changes from this controller.
Declaration
Objective-C
@property (readwrite, nonatomic) id<SCAdListener> listener;
-
The view your ads are displayed in
Declaration
Objective-C
@property (readonly, nonatomic) SCAdContentView *contentView;
-
Undocumented
Declaration
Objective-C
- (id)initWithConfiguration:(SCAdConfiguration*)configuration;
-
Recommended method for initializing SCAdController. Submit a view (contentView) of your layout To define the location where the ad is to be played. Also, you need to pass your adURL Specifies the type of ads and other attributes such as execution order or count.
Declaration
Objective-C
- (id)initWithContentView:(SCAdContentView *)contentView configuration:(SCAdConfiguration *)configuration;
-
play / continue with currently set smartclip advertising video
Declaration
Objective-C
- (void)play;
-
pause with currently set smartclip advertising video
Declaration
Objective-C
- (void)pause;
-
check if the currently set smartclip advertising video is paused
Declaration
Objective-C
- (id)isPaused;
-
check if the currently set smartclip advertising video has ended
Declaration
Objective-C
- (id)hasEnded;
-
check if the currently set smartclip advertising video is available
Declaration
Objective-C
- (id)isAvailable;
-
Undocumented
Declaration
Objective-C
- (NSString*)adURL;
-
Has to be called when ScAdConfiguration.useExtendedClickThru is used and the click thru url was shown to the user.
Declaration
Objective-C
- (void)clickThruAccepted;
-
Has to be called when ScAdConfiguration.useExtendedClickThru is used and the click thru url was NOT shown to the user.
Declaration
Objective-C
- (void)clickThruRejected;
-
Overwrites the UIViewControllers removeFromParentViewController method. This will additionally remove the ad view from view hierarchy.
Declaration
Objective-C
- (void)removeFromParentViewController;
-
Can be used to get the current adInfo object from the webView
Declaration
Objective-C
- (void)getAdInfoWith:(SCAdInfoCompletionHandler)completionHandler;