English
Log In
You can then view all documents
Installation/iOS/Splash Ads
Splash Ads
Last updated 2022-01-19 22:46:41

Splash Ads

Introduction

The open-screen advertisement is mainly the full-screen advertisement view displayed when the APP is started. The development can display the designed view as long as the access standard is followed. After the display is completed, it will automatically close and enter the main interface of the application.

Supported ad size: The size of the open-screen ad is the size set when the developer requests the ad. It is recommended that the requested size be set to be consistent with the size of the display area to avoid material distortion.

Permission

**SDK rendering on-screen advertising: ** Open by default
**Template rendering on-screen advertisement: ** Need to apply

SDK rendering on-screen ads

Instructions for use

The SDK renders open-screen ads. Use the BUSplashAdView object to call the loadAdData method to request ads, and use addSubview to add ads for display. By setting the BUSplashAdDelegate agent, you can get callbacks such as ads, display, click, close, and jump.

Create ad slot objects, request ads, display ads

BUSplashAdView

You need to pass in the ad slot object when requesting an ad, and the ad slot ID must be passed in when the ad slot object is created

Required parameters:

Field name

Field definition

Field type

Remarks

SlotID

Code bit

NSString

Slot id

frame

Size

CGRect

Ad request size

Optional parameters:

Field name

Field definition

Field type

Remarks

hideSkipButton

Whether to hide the skip button

BOOL type

Whether to customize the skip button BOOL type The default is NO

tolerateTimeout

Timeout

NSTimeInterval

The default timeout is 3.5s

needSplashZoomOutAd

Whether to set the dot-eye advertisement

BOOL

Whether the dot-eye advertisement is required The default is NO
Note: 3200-3500 version is valid, 3600 and above versions are invalid

Use BUSplashAdView to create an object, use BUSplashAdView to call loadAdData to request ads

复制

Receive ads loading results

BUSplashAdDelegate

Callback Method

Notes

splashAd: didFailWithError:

The returned error code (error) indicates the reason why the ad failed to load. For details of all error codes, please refer to the link [Link](https://www.csjplatform.com/help/doc/5de4cc6d78c8690012a90aa5?from=ad .oceanengine.com&id=5de4cc6d78c8690012a90aa5).

splashAdDidLoad

Callback for successful ad loading

BUSplashAdDelegate callback description

Callback Method

Notes

splashAdDidLoad:

Successful callback of SDK rendering open screen ad loading

splashAd: didFailWithError:

The returned error code (error) indicates the reason why the ad failed to load. For details of all error codes, please refer to the link [Link](https://www.csjplatform.com/help/doc/5de4cc6d78c8690012a90aa5?from=ad .oceanengine.com&id=5de4cc6d78c8690012a90aa5)

splashAdWillVisible:

SDK rendering on-screen ads will be displayed soon

splashAdDidClick:

SDK rendering open screen ad click callback

splashAdDidClose:

SDK renders the open-screen ad close callback. This callback will be triggered directly when the user clicks on the ad. It is recommended to directly remove the ad object in this callback method

splashAdWillClose:

SDK rendering open-screen advertisement is about to close callback

splashAdDidCloseOtherController:(BUSplashAdView *)splashAd interactionType:

This callback is called when the ad jumps to another controller and the controller is closed. interactionType: This parameter can distinguish the opened appstore/webpage/video ad details page

splashAdDidClickSkip:

This callback is triggered when the user clicks the skip button, and the related logic after the user clicks to jump can be processed in this callback method

splashAdCountdownToZero:

This callback will be triggered when the countdown is 0. If the client uses this callback method, it is recommended to remove ads in this callback method

By setting the BUSplashAdDelegate agent, you can get callbacks such as clicks, closes, and jumps of advertisements. For other proxy methods, please refer to the AppDelegate class/BUDSplashViewController class #pragma mark-BUSplashAdView section

Precautions

  1. It is best to place the request of the screen advertisement in the didFinishLaunchingWithOptions callback method for related processing to avoid any form of cache processing. The request for the screen advertisement is placed in the foreground for related processing.
  2. Avoid the situation that the window displaying the advertisement is released in advance or the wrong window is fetched
  3. In the splashAd: didFailWithError: callback method, do the removal of the advertisement object to avoid some specific scenarios caused by the failure of the advertisement request
  4. Make sure to set the Allow Arbitrary Loads permission to avoid situations where certain inventory cannot be loaded
  5. It is recommended to set the timeout time of the on-screen advertisement to 3.5s or more to ensure that it does not conflict with the timeout time of the request of your own project and avoid the scenario of request failure.
  6. The open-screen advertisement returns a view, and the client can display the view directly. If you want to add your own logo at the bottom, you need to reduce the display area of ​​the open-screen advertisement. At this time, when requesting the width and height, fill in the cropped width and height, that is, the requested size is screen width* (screen height-logo height)
  7. In the callback methods of splashAdDidClick, splashAdDidClickSkip, splashAd:didFailWithError, splashAdDidCloseOtherController: interactionType, and splashAdCountdownToZero callback methods to remove ads to avoid abnormal situations: [self.splashView removeSplashView];

resource

For detailed access, please refer to the AppDelegate class/BUDSplashViewController class in the demo, and for the advertisement loading and display request part, please refer to the addSplashAD method/BUDSplashViewController class in the AppDelegate class. The buildupDefaultSplashView method

Template rendering on-screen advertising

Instructions for use

Template rendering open-screen ads use the BUNativeExpressSplashView object to call the loadAdData method to request ads, and use addSubview to add the ad object to display the ad. By setting the BUNativeExpressSplashViewDelegate agent, get the ad, display, Click, close, jump and other callbacks.

Create ad slot objects, request ads, display ads

BUNativeExpressSplashView

You need to pass in the ad slot object when requesting an ad, and the ad slot ID must be passed in when the ad slot object is created

Required parameters:

Field name

Field definition

Field type

Remarks

slotID

Code bit

NSString

Code bit ID

adSize

Ad size

CGSize

Ad request size

Optional parameters:

Field name

Field definition

Field type

Remarks

hideSkipButton

Whether to customize the skip button

BOOL

Whether to customize the skip button The default is NO

tolerateTimeout

Timeout

NSTimeInterval

The default timeout is 3.5s

Use BUNativeExpressSplashView to create objects, use BUNativeExpressSplashView to call loadAdData to request ads, and use addSubview to add advertising objects to display ads

复制

Custom skip button style

Set the hideSkipButton property of the BUNativeExpressSplashView object to YES, and the client can implement the skip button style and related jump logic by itself.

Receive ads loading results

BUNativeExpressSplashViewDelegate

Callback Method

Notes

nativeExpressSplashView: didFailWithError:

The returned error code (error) indicates the reason why the ad failed to load. Please refer to the link for details of all error codes. Link

nativeExpressSplashViewDidLoad

Ad loading successfully callback

nativeExpressSplashViewRenderFail: error:

Rendering failed, the rendering failed due to network or hardware reasons, you can change the mobile phone or network environment to test. It is recommended to upgrade to the latest version of the CSJ platform SDK

nativeExpressSplashViewRenderSuccess:

Render success callback

BUNativeExpressSplashViewDelegate callback description

Callback Method

Notes

nativeExpressSplashViewDidLoad:

Callback for successful loading of advertising materials

nativeExpressSplashView: didFailWithError:

The returned error code (error) indicates the reason why the ad failed to load. Please refer to the link for details of all error codes. Link

nativeExpressSplashViewRenderSuccess:

Render success callback

nativeExpressSplashViewRenderFail: error:

Rendering failed, the rendering failed due to network or hardware reasons, you can change the mobile phone or network environment to test. It is recommended to upgrade to the latest version of CSJ

SDKnativeExpressSplashViewWillVisible:

The template opening ad will be displayed soon

nativeExpressSplashViewDidClick:

Click callback

nativeExpressSplashViewDidClickSkip:

Click to skip callback

nativeExpressSplashViewCountdownToZero:

This callback will be triggered when the countdown is 0. If the client uses this callback method, it is recommended to remove the advertisement in this callback method and set the advertisement object to nil

nativeExpressSplashViewDidClose:

Ad close callback. This callback will be triggered directly when the user clicks on the ad. It is recommended to directly remove the ad object in this callback method and set the ad object to nil

nativeExpressSplashViewFinishPlayDidPlayFinish:didFailWithError:

This callback will be triggered when the ad is played

nativeExpressSplashViewDidCloseOtherController: interactionType:

This callback is called when the ad jumps to another controller and the controller is closed. InteractionType: This parameter can be distinguished from the opened appstore/webpage/video ad details page

By setting the BUNativeExpressSplashViewDelegate agent, you can get the click, close, jump and other callbacks of the advertisement. For other proxy methods, please refer to the BUDExpressSplashViewController class #pragma mark-SplashAdView section

Precautions

  1. It is best to place the request of the screen advertisement in the didFinishLaunchingWithOptions callback method for related processing to avoid any form of cache processing. The request for the screen advertisement is placed in the foreground for related processing.
  2. Avoid the situation where the window that displays the advertisement is released in advance or the wrong** window is fetched
  3. In the nativeExpressSplashView: didFailWithError: callback method, do the operation of the advertising object remove to avoid some specific scenarios caused by the failure of the ad request. Remember to call **removeSplashView before **remove the ad view. **Method, otherwise there may be a countdown problem or a video playback problem, and the advertising object will be blanked
  4. Confirm that the Allow Arbitrary Loads permission is set to avoid the occurrence of certain situations where the inventory cannot be loaded
  5. The timeout time of the on-screen advertisement is set to 3.5s by default, to ensure that it does not conflict with the request timeout time of its own project, and to avoid the scene of request failure
  6. The open-screen advertisement returns a view, and the client can display the view directly. If you want to add your own logo at the bottom, you need to reduce the display area of ​​the open-screen advertisement. At this time, when requesting the width and height, fill in the cropped width and height, that is, the requested size is screen width* (screen height-logo height)
  7. In the callback methods of splashAdDidClick, splashAdDidClickSkip, splashAd:didFailWithError, splashAdDidCloseOtherController: interactionType, and splashAdCountdownToZero, perform the removal operation of advertisements to avoid abnormal situations. The developer needs to call the removeSplashView method provided by the CSJ first, and then use removeFromSuperview to try to remove it from the parent, which requires two removal operations;
  8. The removeSplashView method needs to be called before removeFromSuperview, otherwise there may be a countdown problem or a video playback problem. [self removeSplashAdView];
  9. If you use non-AppDelegate's window for the display of open-screen advertisements, avoid release the window in advance that may cause the ad to be unable to click and jump
  10. **Currently, the open-screen advertisement does not support directly addSubview to the window, otherwise, there may be an abnormal scene of clicking the advertisement to jump. **
  11. The custom skip button for the open-screen advertisement was modified to countdown for the media to handle after 3706, and the version before 3706 is the countdown for SDK processing

resource

For detailed access, please refer to the BUDExpressSplashViewController class in Demo, and for the advertisement loading and display request part, please refer to the buildupDefaultSplashView method in the BUDExpressSplashViewController class.

Innovative style-opening the screen and finishing touch

How to use the screen opening and eye-catching ads: Initialize, add needSplashZoomOutAd settings
If the screen opening and finishing style is connected, the following logic must be implemented

复制


Contents
Contact us