You've already forked Commercialization.topon
update core
This commit is contained in:
@@ -29,14 +29,14 @@ namespace AnyThinkAds.Api
|
||||
public String errorMessage { get; }
|
||||
public String errorCode { get; }
|
||||
|
||||
public ATAdErrorEventArgs(String placementId, String message, String code)
|
||||
public ATAdErrorEventArgs(String placementId, String code, String message)
|
||||
: base(placementId)
|
||||
{
|
||||
errorMessage = message;
|
||||
errorCode = code;
|
||||
}
|
||||
|
||||
public ATAdErrorEventArgs(String placementId, String callbackJson, String message, String code)
|
||||
public ATAdErrorEventArgs(String placementId, String callbackJson, String code, String message)
|
||||
: base(placementId, callbackJson)
|
||||
{
|
||||
errorMessage = message;
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace AnyThinkAds.Android
|
||||
public void onBannerFailed(string placementId,string code, string error)
|
||||
{
|
||||
Debug.Log("onBannerFailed...unity3d.");
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
//广告点击
|
||||
@@ -265,7 +265,7 @@ namespace AnyThinkAds.Android
|
||||
public void onBannerAutoRefreshFail(string placementId, string code, string msg)
|
||||
{
|
||||
Debug.Log("onBannerAutoRefreshFail...unity3d.");
|
||||
onAdAutoRefreshFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, msg, code));
|
||||
onAdAutoRefreshFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, msg));
|
||||
}
|
||||
|
||||
// Adsource Listener
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace AnyThinkAds.Android
|
||||
public void onInterstitialAdLoadFail(string placementId,string code, string error)
|
||||
{
|
||||
Debug.Log("onInterstitialAdFailed...unity3d.");
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
//开始播放
|
||||
@@ -234,13 +234,13 @@ namespace AnyThinkAds.Android
|
||||
public void onInterstitialAdVideoError(string placementId,string code, string error)
|
||||
{
|
||||
Debug.Log("onInterstitialAdPlayFailed...unity3d.");
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
//展示失败
|
||||
public void OnInterstitialAdFailedToShow(string placementID) {
|
||||
Debug.Log("Unity: ATInterstitialAdClient::OnInterstitialAdFailedToShow()");
|
||||
onAdShowFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, "Failed to show video ad", "-1"));
|
||||
onAdShowFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, "-1", "Failed to show video ad"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace AnyThinkAds.Android
|
||||
public void onRewardedVideoAdFailed(string placementId,string code, string error)
|
||||
{
|
||||
Debug.Log("onRewardedVideoAdFailed...unity3d.");
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace AnyThinkAds.Android
|
||||
public void onRewardedVideoAdPlayFailed(string placementId,string code, string error)
|
||||
{
|
||||
Debug.Log("onRewardedVideoAdPlayFailed...unity3d.");
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
public void onRewardedVideoAdClosed(string placementId,bool isRewarded, string callbackJson)
|
||||
@@ -237,7 +237,7 @@ namespace AnyThinkAds.Android
|
||||
public void onRewardedVideoAdAgainPlayFailed(string placementId, string code, string error)
|
||||
{
|
||||
Debug.Log("onRewardedVideoAdAgainPlayFailed...unity3d.");
|
||||
onPlayAgainFailure?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onPlayAgainFailure?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace AnyThinkAds.Android
|
||||
public void onAdSourceBiddingFail(string placementId, string callbackJson, string code, string error)
|
||||
{
|
||||
Debug.Log("onAdSourceBiddingFail...unity3d." + placementId + "," + code + "," + error + "," + callbackJson);
|
||||
onAdSourceBiddingFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdSourceBiddingFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
public void onAdSourceAttempt(string placementId, string callbackJson)
|
||||
@@ -289,7 +289,7 @@ namespace AnyThinkAds.Android
|
||||
public void onAdSourceLoadFail(string placementId, string callbackJson, string code, string error)
|
||||
{
|
||||
Debug.Log("onAdSourceLoadFail...unity3d." + placementId + "," + code + "," + error + "," + callbackJson);
|
||||
onAdSourceLoadFailureEvent?.Invoke(this,new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdSourceLoadFailureEvent?.Invoke(this,new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace AnyThinkAds.iOS {
|
||||
|
||||
public void OnBannerAdLoadFail(string placementId, string code, string message) {
|
||||
Debug.Log("Unity: HBBannerAdWrapper::OnBannerAdLoadFail()");
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, message, code));
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, message));
|
||||
}
|
||||
|
||||
public void OnBannerAdImpress(string placementId, string callbackJson) {
|
||||
@@ -123,7 +123,7 @@ namespace AnyThinkAds.iOS {
|
||||
|
||||
public void OnBannerAdAutoRefreshFail(string placementId, string code, string message) {
|
||||
Debug.Log("Unity: HBBannerAdWrapper::OnBannerAdAutoRefreshFail()");
|
||||
onAdAutoRefreshFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, message, code));
|
||||
onAdAutoRefreshFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, message));
|
||||
}
|
||||
|
||||
public void OnBannerAdClose(string placementId) {
|
||||
|
||||
@@ -82,12 +82,12 @@ namespace AnyThinkAds.iOS {
|
||||
|
||||
public void OnInterstitialAdLoadFailure(string placementID, string code, string error) {
|
||||
Debug.Log("onInterstitialAdFailed...unity3d.");
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, error, code));
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, code, error));
|
||||
}
|
||||
|
||||
public void OnInterstitialAdVideoPlayFailure(string placementID, string code, string error) {
|
||||
Debug.Log("Unity: ATInterstitialAdClient::OnInterstitialAdVideoPlayFailure()");
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, error, code));
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, code, error));
|
||||
}
|
||||
|
||||
public void OnInterstitialAdVideoPlayStart(string placementID, string callbackJson) {
|
||||
@@ -107,7 +107,7 @@ namespace AnyThinkAds.iOS {
|
||||
|
||||
public void OnInterstitialAdFailedToShow(string placementID) {
|
||||
Debug.Log("Unity: ATInterstitialAdClient::OnInterstitialAdFailedToShow()");
|
||||
onAdShowFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, "Failed to show video ad", "-1"));
|
||||
onAdShowFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementID, "-1", "Failed to show video ad"));
|
||||
}
|
||||
|
||||
public void OnInterstitialAdClick(string placementID, string callbackJson) {
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace AnyThinkAds.iOS {
|
||||
|
||||
public void onRewardedVideoAdFailed(string placementId, string code, string error) {
|
||||
Debug.Log("Unity: ATRewardedVideoAdClient::onRewardedVideoAdFailed()");
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdLoadFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
public void onRewardedVideoAdPlayStart(string placementId, string callbackJson) {
|
||||
@@ -203,7 +203,7 @@ namespace AnyThinkAds.iOS {
|
||||
|
||||
public void onRewardedVideoAdPlayFailed(string placementId, string code, string error) {
|
||||
Debug.Log("Unity: ATRewardedVideoAdClient::onRewardedVideoAdPlayFailed()");
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onAdVideoFailureEvent?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
public void onRewardedVideoAdClosed(string placementId, bool isRewarded, string callbackJson) {
|
||||
@@ -238,7 +238,7 @@ namespace AnyThinkAds.iOS {
|
||||
public void onRewardedVideoAdAgainPlayFailed(string placementId, string code, string error)
|
||||
{
|
||||
Debug.Log("Unity: ATRewardedVideoAdClient::onRewardedVideoAdAgainPlayFailed()");
|
||||
onPlayAgainFailure?.Invoke(this, new ATAdErrorEventArgs(placementId, error, code));
|
||||
onPlayAgainFailure?.Invoke(this, new ATAdErrorEventArgs(placementId, code, error));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,21 +23,21 @@
|
||||
<uses-permission android:name="${applicationId}.openadsdk.permission.TT_PANGOLIN" />
|
||||
|
||||
<!--可选权限-->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.GET_TASKS"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<!-- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />-->
|
||||
<!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />-->
|
||||
<!-- <uses-permission android:name="android.permission.GET_TASKS"/>-->
|
||||
<!-- <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />-->
|
||||
|
||||
<!--可选,Mobrain SDK提供“获取地理位置权限”方式上报用户位置,两种方式均可不选,添加位置权限或参数将帮助投放定位广告-->
|
||||
<!--请注意:无论通过何种方式提供给穿山甲用户地理位置,均需向用户声明地理位置权限将应用于穿山甲广告投放,穿山甲不强制获取地理位置信息-->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
|
||||
|
||||
<!-- 如果有视频相关的广告且使用textureView播放,请务必添加,否则黑屏 -->
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
<!-- 高于Android 11的系统上,如果应用的 targetSdkVersion >= 30 ,推荐增加以下权限声明
|
||||
(SDK将通过此权限正常触发广告行为,并保证广告的正确投放。此权限需要在用户隐私文档中声明)-->
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
<!-- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />-->
|
||||
|
||||
|
||||
<application>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1610503b01fd04462a2e8403e6b665b5
|
||||
guid: 6258abbd822934cb392714e9c03e7f19
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fbff6d0de904402ba1ed3df04ad07a3
|
||||
guid: 8e1455b7aa64746c8b9f3e6054db6dfb
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c345117aff0e042ac85ce3315da4d6fb
|
||||
guid: 22054e0f575364132bd673b6f3e5e611
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 886377a8441c8a54fb70274bb3cbe937
|
||||
guid: ea079269180894350971b9be667772ce
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4abbc90e2bfe9438083fa2bad2088718
|
||||
guid: a11f4c3dfcecb104490f1276247179ea
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
@@ -1,32 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74e09de28a301e94384f0f4ea7700036
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1dc9f6f2d58ae7b479de2b0972d6d2ae
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,32 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08bd2788a542b7846a7b963ec8761583
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4aed7ebe9b7827b49992bb8a511f2d0c
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><dependencies>
|
||||
<iosPods>
|
||||
<iosPod name="AnyThinkiOS" version="6.1.51" />
|
||||
<iosPod name="AnyThinkiOS" version="6.1.71" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><dependencies>
|
||||
<iosPods>
|
||||
<iosPod name="AnyThinkiOS/AnyThinkGDTAdapter" version="6.1.51" />
|
||||
<iosPod name="AnyThinkiOS/AnyThinkGDTAdapter" version="6.1.71" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
8
Assets/AnyThinkAds/Plugins/iOS/gromore_plus.meta
Normal file
8
Assets/AnyThinkAds/Plugins/iOS/gromore_plus.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cb42c988c5f1284082deff139aaa564
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e087ddcfe84f4a48a9a48ae9f89395a
|
||||
folderAsset: yes
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffe6816d02a3a07489a09317e3168219
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98583afab0445e54ea20d0735858101d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// ABUCsjAdapter.h
|
||||
// Pods
|
||||
//
|
||||
// Created by bytedance on 2021/12/7.
|
||||
//
|
||||
|
||||
#ifndef ABUCsjAdapter_h
|
||||
#define ABUCsjAdapter_h
|
||||
|
||||
|
||||
#endif /* ABUCsjAdapter_h */
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2eba851f150d930479e3e4ee4c9a2ee9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06d6800334349b247bf0a494688d6e4e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,6 @@
|
||||
framework module ABUAdCsjAdapter {
|
||||
umbrella header "ABUAdCsjAdapter.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55548a1cdeadaa947a0f6dc57c889a6f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9afcca388cd6bb44689e178d50865c2a
|
||||
folderAsset: yes
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 198d39cdbbd34f849826db113c148527
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52752c31733ff254d8486358ba9f54be
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// ABUAdLoadInfo.h
|
||||
// Ads-Mediation-CN
|
||||
//
|
||||
// Created by bytedance on 2022/1/12.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ABUAdLoadInfo : NSObject
|
||||
|
||||
/// network的广告位ID
|
||||
@property (nonatomic, copy, readonly) NSString *mediationRit;
|
||||
|
||||
/// network的名称,同平台配置
|
||||
@property (nonatomic, copy, readonly) NSString *adnName;
|
||||
|
||||
/// network的自定义名称,同平台配置,非自定义时为nil
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *customAdnName;
|
||||
|
||||
/// 错误码
|
||||
@property (nonatomic, assign, readonly) NSInteger errCode;
|
||||
|
||||
/// 错误描述
|
||||
@property (nonatomic, copy, readonly) NSString *errMsg;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bc3e4bf0070c1e4bbcc1a9ca7a091cf
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,133 @@
|
||||
//
|
||||
// Created by bytedance on 2021/6/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#pragma mark - 通用参数
|
||||
/// 聚合广告请求ID,NSString
|
||||
extern NSString *const ABUAdLoadingParamLinkID;
|
||||
|
||||
/// 聚合广告位ID,NSString
|
||||
extern NSString *const ABUAdLoadingParamMediationRitID;
|
||||
|
||||
/// 场景ID,NSString
|
||||
extern NSString *const ABUAdLoadingParamScenarioID;
|
||||
|
||||
/// ADN广告位ID,NSString
|
||||
extern NSString *const ABUAdLoadingParamMediaRitID;
|
||||
|
||||
/// ADN广告位名称,平台配置名称,NSString
|
||||
extern NSString *const ABUAdLoadingParamMediaName;
|
||||
|
||||
/// 请求广告的渲染类型,NSNumber/NSInteger,0 无需区分渲染类型; 1 ADN提供渲染; 2 开发者自渲染
|
||||
extern NSString *const ABUAdLoadingParamExpressAdType;
|
||||
|
||||
/// 是否请求模板广告的描述信息,NSDictionary
|
||||
extern NSString *const ABUAdLoadingParamExpressAdTypeInfos;
|
||||
|
||||
/// 媒体专属扩展参数, NSDictionary
|
||||
extern NSString *const ABUAdLoadingParamMediaExtra;
|
||||
|
||||
/// 广告位中混用其他类型代码位时的代码位类型,0-未混用 3-banner类型 4-信息流类型
|
||||
extern NSString *const ABUAdLoadingParamAdSubType;
|
||||
|
||||
#pragma mark - 自定义补充
|
||||
|
||||
/// 自定义Adapter扩展参数, NSString,JSON格式
|
||||
extern NSString *const ABUAdLoadingParamCustomJson;
|
||||
|
||||
/// 获取竞价类型,NSNumber/NSInteger,0-普通广告位 1-Client竞价广告位 100-P层数据位
|
||||
extern NSString *const ABUAdLoadingParamBiddingType;
|
||||
|
||||
#pragma mark - Banner
|
||||
|
||||
/// 期望广告尺寸,NSValue/CGSize
|
||||
extern NSString *const ABUAdLoadingParamBNExpectSize;
|
||||
|
||||
#pragma mark - 插屏广告
|
||||
/// 期望广告尺寸,NSValue/CGSize
|
||||
extern NSString *const ABUAdLoadingParamISExpectSize;
|
||||
|
||||
/// 是否是静音,NSNumber/BOOL
|
||||
extern NSString *const ABUAdLoadingParamISIsMute;
|
||||
|
||||
#pragma mark - 全屏视频
|
||||
|
||||
/// 是否是静音,NSNumber/BOOL
|
||||
extern NSString *const ABUAdLoadingParamFVIsMute;
|
||||
|
||||
#pragma mark - 激励视频
|
||||
|
||||
/// 是否是静音,NSNumber/BOOL
|
||||
extern NSString *const ABUAdLoadingParamRVIsMute;
|
||||
|
||||
/// 用户标识, NSString
|
||||
extern NSString *const ABUAdLoadingParamRVUserID;
|
||||
|
||||
/// 奖励名称, NSString
|
||||
extern NSString *const ABUAdLoadingParamRVRewardName;
|
||||
|
||||
/// 奖励金额,NSNumber/NSInteger
|
||||
extern NSString *const ABUAdLoadingParamRVRewardAmount;
|
||||
|
||||
/// 扩展信息, NSString
|
||||
extern NSString *const ABUAdLoadingParamRVExtra;
|
||||
|
||||
#pragma mark - Splash广告
|
||||
/// 期望ZoomOutView, NSNumber/BOOL
|
||||
extern NSString *const ABUAdLoadingParamSPNeedZoomOutIfCan;
|
||||
|
||||
/// 是否需要开屏卡片功能,NSNumber/BOOL
|
||||
extern NSString *const ABUAdLoadingParamSPSupportCardView;
|
||||
|
||||
/// 自定义底部视图,UIView
|
||||
extern NSString *const ABUAdLoadingParamSPCustomBottomView;
|
||||
|
||||
/// 期望广告尺寸,NSValue/CGSize
|
||||
extern NSString *const ABUAdLoadingParamSPExpectSize;
|
||||
|
||||
/// 开屏超时时间,NSNumber/NSInteger
|
||||
extern NSString *const ABUAdLoadingParamSPTolerateTimeout;
|
||||
|
||||
/// 开屏点击区域,NSNumber/NSInteger/ABUSplashButtonType
|
||||
extern NSString *const ABUAdLoadingParamSPButtonType;
|
||||
|
||||
#pragma mark - Native/Draw广告
|
||||
/// 期望广告图片尺寸,NSValue/CGSize
|
||||
extern NSString *const ABUAdLoadingParamNAExpectImageSize;
|
||||
|
||||
/// 期望广告尺寸,NSValue/CGSize
|
||||
extern NSString *const ABUAdLoadingParamNAExpectSize;
|
||||
|
||||
/// 是否是静音,NSNumber/BOOL
|
||||
extern NSString *const ABUAdLoadingParamNAIsMute;
|
||||
|
||||
/// 加载广告数量,NSNumber/NSInteger
|
||||
extern NSString *const ABUAdLoadingParamNALoadAdCount;
|
||||
|
||||
#pragma mark - 加载回调参数,即adapter开发者通过`- ***Ad:didLoadSuccess/Fail*** ext:`中NSDictionary回调的数据
|
||||
|
||||
/// 【可选】AND广告ECPM,NSString,单位分
|
||||
extern NSString *const ABUMediaAdLoadingExtECPM;
|
||||
|
||||
/// 【可选】AND广告ECPMLevel,NSString
|
||||
extern NSString *const ABUMediaAdLoadingExtECPMLevel;
|
||||
|
||||
/// 【可选】ADN广告的加载标识,NSString
|
||||
extern NSString *const ABUMediaAdLoadingExtRequestID;
|
||||
|
||||
/// 【可选】AND广告唯一标识,NSString
|
||||
extern NSString *const ABUMediaAdLoadingExtAdID;
|
||||
|
||||
/// 【可选】AND广告创意唯一标识,NSString
|
||||
extern NSString *const ABUMediaAdLoadingExtCreativeID;
|
||||
|
||||
/// 【可选】直播间信息,NSDictionary
|
||||
extern NSString *const ABUMediaAdLoadingExtLiveRoom;
|
||||
|
||||
/// 【可选】商品信息,NSDictionary
|
||||
extern NSString *const ABUMediaAdLoadingExtProduct;
|
||||
|
||||
/// 【可选】卷信息,NSDictionary
|
||||
extern NSString *const ABUMediaAdLoadingExtCoupon;
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61c3d8393d6a4374297bc9b74744c3f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ABUAdSDK.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by wangchao on 2020/2/21.
|
||||
// Copyright © 2020 bytedance. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for ABUAdSDK.
|
||||
FOUNDATION_EXPORT double ABUAdSDKVersionNumber;
|
||||
|
||||
//! Project version string for ABUAdSDK.
|
||||
FOUNDATION_EXPORT const unsigned char ABUAdSDKVersionString[];
|
||||
|
||||
#pragma mark - 基本
|
||||
#import "ABUAdSDKManager.h"
|
||||
#import "ABUPersonaliseConfigAdapter.h"
|
||||
#import "ABURitInfo.h"
|
||||
|
||||
#pragma mark - 隐私
|
||||
#import "ABUPrivacyConfig.h"
|
||||
|
||||
#pragma mark - 广告类型
|
||||
#import "ABUBannerAd.h"
|
||||
#import "ABURewardedVideoAd.h"
|
||||
#import "ABUFullscreenVideoAd.h"
|
||||
#import "ABUSplashAd.h"
|
||||
#import "ABUNativeAdsManager.h"
|
||||
#import "ABUInterstitialAd.h"
|
||||
#import "ABUInterstitialProAd.h"
|
||||
#import "ABUSplashUserData.h"
|
||||
#import "ABUDrawAdsManager.h"
|
||||
|
||||
#pragma mark - adapter 开发专用
|
||||
#import "ABUAdapterRegister.h"
|
||||
#import "ABUAdLoadingParams.h"
|
||||
#import "ABUMediatedNativeAd.h"
|
||||
#import "ABUMediaBidResult.h"
|
||||
|
||||
#import "ABUCustomBannerAdapter.h"
|
||||
#import "ABUCustomRewardedVideoAdapter.h"
|
||||
#import "ABUCustomFullscreenVideoAdapter.h"
|
||||
#import "ABUCustomDrawAdapter.h"
|
||||
#import "ABUCustomNativeAdapter.h"
|
||||
#import "ABUCustomSplashAdapter.h"
|
||||
#import "ABUCustomInterstitialAdapter.h"
|
||||
#import "ABUCanvasView.h"
|
||||
#import "ABUDislikeReason.h"
|
||||
|
||||
#pragma mark - 辅助
|
||||
#import "ABUVersion.h"
|
||||
#import "ABUDictionary.h"
|
||||
#import "UIWindow+GroMore.h"
|
||||
#import "ABUViewTracker.h"
|
||||
#import "ABUViewTrackerHelper.h"
|
||||
#import "ABUAdViewWitnessChecker.h"
|
||||
#import "ABUVideoAdReporter.h"
|
||||
#import "ABUDislikeReporter.h"
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80a26684850acbf429a9787bc4239f83
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// ABUADSDK_const_h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/19.
|
||||
//
|
||||
|
||||
#ifndef ABUADSDK_const_h
|
||||
#define ABUADSDK_const_h
|
||||
|
||||
#pragma mark - 全屏视频、激励视频展示扩展
|
||||
|
||||
#pragma mark 扩展展示参数字段 ** swift请勿直接使用枚举,应使用rawValue
|
||||
/// ABUShowExtroInfoKey, type of scene, only used for pangle SDK now.And the value of key see ABURitSceneType ABURitSceneType
|
||||
static NSString * ABUShowExtroInfoKeySceneType = @"ABUShowExtroInfoKeySceneType";
|
||||
|
||||
/// scene description, the description defined by the developer, which needs to be assigned when ABUShowExtroInfoKeySceneType = 0
|
||||
static NSString * ABUShowExtroInfoKeySceneDescription = @"ABUShowExtroInfoKeySceneDescription";
|
||||
|
||||
#pragma mark 扩展展示参数补充
|
||||
|
||||
typedef NS_ENUM (NSInteger, ABURitSceneType) {
|
||||
// custom
|
||||
ABURitSceneType_custom = 0,
|
||||
// “home_open_bonus”, Login/open rewards (login, sign-in, offline rewards doubling, etc.)
|
||||
ABURitSceneType_home_open_bonus = 1,
|
||||
// "home_svip_bonus", Special privileges (VIP privileges, daily rewards, etc.)
|
||||
ABURitSceneType_home_svip_bonus = 2,
|
||||
// "home_get_props", Watch rewarded video ad to gain skin, props, levels, skills, etc
|
||||
ABURitSceneType_home_get_props = 3,
|
||||
// "home_try_props", Watch rewarded video ad to try out skins, props, levels, skills, etc
|
||||
ABURitSceneType_home_try_props = 4,
|
||||
// "home_get_bonus", Watch rewarded video ad to get gold COINS, diamonds, etc
|
||||
ABURitSceneType_home_get_bonus = 5,
|
||||
// "home_gift_bonus", Sweepstakes, turntables, gift boxes, etc
|
||||
ABURitSceneType_home_gift_bonus = 6,
|
||||
// "game_start_bonus", Before the opening to obtain physical strength, opening to strengthen, opening buff, task props
|
||||
ABURitSceneType_game_start_bonus = 7,
|
||||
// "geme_reduce_waiting", Reduce wait and cooldown on skill CD, building CD, quest CD, etc
|
||||
ABURitSceneType_game_reduce_waiting = 8,
|
||||
// "game_more_opportunities", More chances (resurrect death, extra game time, decrypt tips, etc.)
|
||||
ABURitSceneType_game_more_opportunities = 9,
|
||||
// "game_finish_rewards", Settlement multiple times/extra bonus (completion of chapter, victory over boss, first place, etc.)
|
||||
ABURitSceneType_game_finish_rewards = 10,
|
||||
// "game_gift_bonus", The game dropped treasure box, treasures and so on
|
||||
ABURitSceneType_game_gift_bonus = 11
|
||||
};
|
||||
|
||||
// 开屏点击区域类型
|
||||
typedef NS_ENUM(NSInteger, ABUSplashButtonType) {
|
||||
ABUSplashButtonTypeFullScreen = 1, // The whole area of splash view will respond to click event
|
||||
ABUSplashButtonTypeDownloadBar = 2 // The area of download bar in splash view will respond to click event
|
||||
};
|
||||
|
||||
#pragma mark - 兼容处理
|
||||
#import "ABUDislikeWords.h"
|
||||
|
||||
/// 三方Adn枚举
|
||||
typedef NS_ENUM (NSInteger, ABUAdnType) {
|
||||
ABUAdnNoPermission = -3, // 无权限访问
|
||||
ABUAdnNoData = -2, // 暂时无真实数据,未获取到最佳广告,一般在未展示之前提前调用
|
||||
ABUAdnNone = 0, // 未知adn
|
||||
ABUAdnPangle = 1, // pangle -> 穿山甲adn
|
||||
ABUAdnAdmob = 2, // admob -> 谷歌Admob
|
||||
ABUAdnGDT = 3, // gdt -> 腾讯广点通adn
|
||||
ABUAdnMTG = 4, // mintegral -> Mintegral adn
|
||||
ABUAdnUnity = 5, // unity -> unity adn
|
||||
ABUAdnBaidu = 6, // baidu -> 百度adn
|
||||
ABUAdnKs = 7, // ks -> 快手Adn
|
||||
ABUAdnSigmob = 8, // sigmob -> Sigmob adn
|
||||
ABUAdnKlevin = 9, // klevin -> Klevin游可赢
|
||||
};
|
||||
|
||||
// MSDK目前实际只有1,2,3,5,7,8
|
||||
typedef NS_ENUM (NSInteger, ABUAdSlotAdType) {
|
||||
ABUAdSlotAdTypeUnknown = 0,
|
||||
ABUAdSlotAdTypeBanner = 1, // banner ads
|
||||
ABUAdSlotAdTypeInterstitial = 2, // interstitial ads
|
||||
ABUAdSlotAdTypeSplash = 3, // splash ads
|
||||
ABUAdSlotAdTypeFeed = 5, // feed ads
|
||||
ABUAdSlotAdTypeRewardVideo = 7, // rewarded video ads
|
||||
ABUAdSlotAdTypeFullscreenVideo = 8, // full-screen video ads
|
||||
ABUAdSlotAdTypeDraw = 9 // draw ads
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, ABUAdSlotPosition) {
|
||||
ABUAdSlotPositionTop = 1,
|
||||
ABUAdSlotPositionBottom = 2,
|
||||
ABUAdSlotPositionFeed = 3,
|
||||
ABUAdSlotPositionMiddle = 4, // for interstitial ad only
|
||||
ABUAdSlotPositionFullscreen = 5,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, ABUBiddingType) {
|
||||
ABUBiddingTypeUnknown = -1,
|
||||
ABUBiddingTypeNormal = 0,
|
||||
ABUBiddingTypeClient = 1,
|
||||
ABUBiddingTypeServer = 2,
|
||||
ABUBiddingTypeMulti = 3,
|
||||
ABUBiddingTypePriority = 100
|
||||
};
|
||||
|
||||
|
||||
#pragma mark - 其他
|
||||
|
||||
#if defined(__has_attribute)
|
||||
#if __has_attribute(deprecated)
|
||||
#define ABU_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
|
||||
#define ABU_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
||||
#else
|
||||
#define ABU_DEPRECATED_MSG_ATTRIBUTE(s)
|
||||
#define ABU_DEPRECATED_ATTRIBUTE
|
||||
#endif
|
||||
#else
|
||||
#define ABU_DEPRECATED_MSG_ATTRIBUTE(s)
|
||||
#define ABU_DEPRECATED_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
#endif /* ABUADSDK_const_h */
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd464f75ef99d134f895a1f0c068e79f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ABUSDKManager.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/20.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUUserConfig.h"
|
||||
#import "ABUUserInfoForSegment.h"
|
||||
#import "ABUAdSDKConst.h"
|
||||
|
||||
@class ABUBaseAd;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
/// SDK管理类
|
||||
@interface ABUAdSDKManager : NSObject
|
||||
|
||||
/// GroMore SDK 版本
|
||||
@property (readonly, class) NSString *SDKVersion;
|
||||
|
||||
/// 初始化GroMore方法,不初始化将无法使用GroMore的相关功能
|
||||
/// @param appId 在GroMore注册的应用ID
|
||||
/// @param config 初始化配置回调
|
||||
+ (void)setupSDKWithAppId:(NSString *)appId config:(ABUUserConfig *(^)(ABUUserConfig *))config;
|
||||
|
||||
/// 获取初始化时使用的应用ID
|
||||
+ (NSString *)appID;
|
||||
|
||||
/// 配置用户分组信息,可随时更新,但用户分组信息更新将触发配置重新加载,请谨慎使用
|
||||
/// @param userInfo 分组信息
|
||||
+ (void)setUserInfoForSegment:(nonnull ABUUserInfoForSegment *)userInfo;
|
||||
|
||||
/// 获取当前主题模式
|
||||
+ (ABUAdSDKThemeStatus)themeStatus;
|
||||
|
||||
/// 获取各类补充信息
|
||||
+ (NSDictionary *)getGMSDKExtraInfo;
|
||||
|
||||
/// 获取配置是否已经加载
|
||||
+ (BOOL)configDidLoad;
|
||||
|
||||
/// 添加配置加载成功回调,该回调会主动触发配置加载,并且仅会回调一次,监听者从内存总消失则不会回调
|
||||
/// @param observer 配置加载监听者,不会造成强引用,请放心使用
|
||||
/// @param action 加载成功回调
|
||||
+ (void)addConfigLoadSuccessObserver:(id _Nonnull)observer withAction:(void(^_Nonnull)(id _Nonnull observer))action;
|
||||
|
||||
/// SDK init后更新extraDeviceMap,主要用于初始化时开发者自己的参数还未生成,需后续传入;!!!该接口会覆盖初始化传入的extraDeviceMap,开发者需自己做增量处理
|
||||
/// @param extraDeviceMap 额外信息
|
||||
+ (void)updateExtraDeviceMap:(NSDictionary *)extraDeviceMap;
|
||||
|
||||
/// 旧版本兼容,初始化GroMore方法,请在初始化配置完成后调用
|
||||
/// @param appID 在GroMore注册的应用ID
|
||||
+ (void)setAppID:(NSString *)appID ABU_DEPRECATED_MSG_ATTRIBUTE("Use setupSDKWithAppId:config: instead");
|
||||
|
||||
/// 旧版本兼容,设置扩展设备信息,如不了解该功能,请勿使用。
|
||||
/// @param extraDeviceStr 扩展设备信息,如@"[{\"device_id\":\"62271333038\"}]"
|
||||
+ (void)setExtDeviceData:(NSString *)extraDeviceStr ABU_DEPRECATED_MSG_ATTRIBUTE("Use setupSDKWithAppId:config: or updateExtraDeviceMap: instead");
|
||||
|
||||
/// 旧版本兼容,配置日志信息
|
||||
/// @param level 日志信息级别,ABUAdSDKLogLevelNone为不开启日志,其他值为开启
|
||||
/// @param language 日志语言,已无效
|
||||
+ (void)setLoglevel:(ABUAdSDKLogLevel)level language:(ABUAdSDKLogLanguage)language ABU_DEPRECATED_MSG_ATTRIBUTE("Use setupSDKWithAppId:config: instead");
|
||||
|
||||
/// 设置广告主题,扩展暗黑模式
|
||||
+ (void)setThemeStatus:(ABUAdSDKThemeStatus)themeStatus;
|
||||
|
||||
/// 触发首次预缓存,针对特定广告位
|
||||
/// @param infos 广告对象
|
||||
/// @param interval 指定每轮请求的时间间隔, 允许时间范围:1-10
|
||||
/// @param concurrent 并发请求的广告数, 允许个数范围:1-20
|
||||
+ (void)preloadAdsWithInfos:(NSArray<__kindof ABUBaseAd *> *)infos andInterval:(NSInteger)interval andConcurrent:(NSInteger)concurrent;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cebfabe6c5f6bcd4c9fd0a8c08cce009
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// ABUAdViewWitnessChecker.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by wangchaop on 22/06/2020.
|
||||
// Copyright © 2017 bytedance. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUViewTracker.h"
|
||||
|
||||
@interface ABUAdViewWitnessChecker : NSObject
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
+ (NSTimeInterval)getWitnessTimeForAd:(id)ad;
|
||||
|
||||
+ (void)setWitnessTimeForAd:(id)ad;
|
||||
|
||||
- (void)removeAd:()ad;
|
||||
|
||||
- (void)addViewTracker:(id<ABUViewTracker>)tracker;
|
||||
|
||||
- (void)removeAllTracker;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bdce9a34f4367044bf34634e450102f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// ABUAdapterRegister.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUCustomConfigAdapter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef id<ABUCustomConfigAdapter>_Nonnull(ABUSameAdnAdapterBattleFunction)(NSArray<id<ABUCustomConfigAdapter>> *);
|
||||
|
||||
FOUNDATION_EXPORT void ABUSameAdnAdapterBattleFunctionRegister(ABUSameAdnAdapterBattleFunction *function);
|
||||
|
||||
#if !defined(ABU_ADAPTER_REGISTER)
|
||||
#define ABU_ADAPTER_REGISTER(__adn_key__,__config_class__) \
|
||||
@implementation ABUAdapterRegister (__config_class__) \
|
||||
-(id<ABUCustomConfigAdapter>)__ABU__##__adn_key__{ \
|
||||
return (id<ABUCustomConfigAdapter>)[[__config_class__ alloc] init]; \
|
||||
}\
|
||||
@end
|
||||
#endif
|
||||
|
||||
@interface ABUAdapterRegister : NSObject
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b27e911d3b6e05c4998b810400bacb2b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ABUAdapterRewardAdInfo.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by bytedance on 2021/8/16.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 验证失败的原因----string
|
||||
extern NSString *const ABUAdapterRewardAdCustomDataReasonKey;
|
||||
|
||||
/// 无法完成验证的错误码----number
|
||||
extern NSString *const ABUAdapterRewardAdCustomDataErrorCodeKey;
|
||||
|
||||
/// 无法完成验证的错误原因----string,包括网络错误、服务端无响应、服务端无法验证等
|
||||
extern NSString *const ABUAdapterRewardAdCustomDataErrorMsgKey;
|
||||
|
||||
/// 奖励类型,0:基础奖励 1:进阶奖励-互动 2:进阶奖励-超过30s的视频播放完成----number
|
||||
/// 目前支持返回该字段的adn:csj
|
||||
/// @warning: GroMore的S2S的验证暂不支持
|
||||
extern NSString *const ABUAdapterRewardAdCustomDataRewardTypeKey;
|
||||
|
||||
/// 建议奖励百分比, 基础奖励为1,进阶奖励为0.0 ~ 1.0,开发者自行换算----number
|
||||
/// 目前支持返回该字段的adn:csj
|
||||
/// @warning: GroMore的S2S的验证暂不支持
|
||||
extern NSString *const ABUAdapterRewardAdCustomDataRewardProposeKey;
|
||||
|
||||
|
||||
/// 激励视频奖励信息,适用于ADN的奖励验证和GroMore的S2S奖励验证
|
||||
@interface ABUAdapterRewardAdInfo : NSObject
|
||||
|
||||
/// adn定义的奖励id
|
||||
@property (nonatomic, copy, nullable) NSString *rewardId;
|
||||
|
||||
/// 发放奖励的名称
|
||||
@property (nonatomic, copy, nullable) NSString *rewardName;
|
||||
|
||||
/// 发放奖励的金额
|
||||
@property (nonatomic, assign) NSInteger rewardAmount;
|
||||
|
||||
/// 交易的唯一标识
|
||||
@property (nonatomic, copy, nullable) NSString *tradeId;
|
||||
|
||||
/// 是否验证通过
|
||||
@property (nonatomic, assign) BOOL verify;
|
||||
|
||||
/// 验证奖励发放的媒体名称,官方支持的ADN名称详见`ABUAdnType`注释部分,自定义ADN名称同平台配置
|
||||
@property (nonatomic, copy, nullable) NSString *adnName;
|
||||
|
||||
/// 其他数据信息,包括但不限于错误信息,固定字段定义见文件上方
|
||||
@property (nonatomic, copy, nullable) NSDictionary *customData;
|
||||
|
||||
/// 是否是通过GroMore的S2S的验证
|
||||
- (BOOL)verifyByGroMoreS2S;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15a94ca9af9d5f24db9a6d4db687bf0e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// ABUNewBannerAd.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/28.
|
||||
//
|
||||
|
||||
#import "ABUBaseAd.h"
|
||||
#import "ABUAdSDKConst.h"
|
||||
#import "ABUCanvasView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class ABUBannerAd;
|
||||
|
||||
/// banner广告代理协议
|
||||
@protocol ABUBannerAdDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/// banner广告加载成功回调
|
||||
/// @param bannerAd 广告操作对象
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdDidLoad:(ABUBannerAd *)bannerAd bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 广告加载失败回调
|
||||
/// @param bannerAd 广告操作对象
|
||||
/// @param error 错误信息
|
||||
- (void)bannerAd:(ABUBannerAd *)bannerAd didLoadFailWithError:(NSError *_Nullable)error;
|
||||
|
||||
/// 广告加载成功后为「混用的信息流自渲染广告」时会触发该回调,提供给开发者自渲染的时机
|
||||
/// @param bannerAd 广告操作对象
|
||||
/// @param canvasView 携带物料的画布,需要对其内部提供的物料及控件做布局及设置UI
|
||||
/// @warning 轮播开启时,每次轮播到自渲染广告均会触发该回调,并且canvasView为其他回调中bannerView的子控件
|
||||
- (void)bannerAdNeedLayoutUI:(ABUBannerAd *)bannerAd canvasView:(ABUCanvasView *)canvasView;
|
||||
|
||||
/// 广告展示回调
|
||||
/// @param bannerAd 广告操作对象
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdDidBecomeVisible:(ABUBannerAd *)bannerAd bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 即将弹出广告详情页
|
||||
/// @param ABUBannerAd 广告操作对象
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdWillPresentFullScreenModal:(ABUBannerAd *)ABUBannerAd bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 详情广告页将要关闭
|
||||
/// @param ABUBannerAd 广告操作对象
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdWillDismissFullScreenModal:(ABUBannerAd *)ABUBannerAd bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 广告点击事件回调
|
||||
/// @param ABUBannerAd 广告操作对象
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdDidClick:(ABUBannerAd *)ABUBannerAd bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 广告关闭回调
|
||||
/// @param ABUBannerAd 广告操作对象
|
||||
/// @param bannerView 广告视图
|
||||
/// @param filterWords 不喜欢广告的原因,由adapter开发者配置,可能为空
|
||||
- (void)bannerAdDidClosed:(ABUBannerAd *)ABUBannerAd bannerView:(UIView *)bannerView dislikeWithReason:(NSArray<NSDictionary *> *_Nullable)filterWords;
|
||||
|
||||
@end
|
||||
|
||||
/// banner广告操作类
|
||||
@interface ABUBannerAd : ABUBaseAd
|
||||
|
||||
/// banner广告操作对象构建
|
||||
/// @param adUnitID 广告位ID
|
||||
/// @param rootViewController 页面跳转控制器
|
||||
/// @param adSize 广告尺寸
|
||||
- (instancetype _Nonnull)initWithAdUnitID:(NSString *_Nonnull)adUnitID
|
||||
rootViewController:(UIViewController *_Nonnull)rootViewController
|
||||
adSize:(CGSize)adSize;
|
||||
|
||||
/// 广告代理回调对象
|
||||
@property (nonatomic, weak) id<ABUBannerAdDelegate> delegate;
|
||||
|
||||
/// 广告尺寸,构造方法中传递的尺寸值
|
||||
@property (nonatomic, assign, readonly) CGSize adSize;
|
||||
|
||||
/// 实际的自动轮播定时间隔,有效值在30-120之间
|
||||
@property (nonatomic, assign, readonly) NSInteger autoRefreshTime __attribute__((unavailable("This attribute is invalid, get the value of refreshTime")));
|
||||
|
||||
/// 平台设置的Banner轮播时间间隔, 范围[10, 180], 其他值按0处理, 默认为0,单位秒
|
||||
@property (nonatomic, assign, readonly) NSInteger refreshTime;
|
||||
|
||||
/// 是否已经准备广告展示,理论上在广告加载回调后即为YES,但受一些因素的影响(例如广告失效),可能为NO。建议在广告展示前调用该方法进行是否可以展示
|
||||
@property (nonatomic, assign, readonly) BOOL isReady;
|
||||
|
||||
/// 返回显示广告对应的披露信息,当没有权限访问时Ecpm会返回'-3'
|
||||
- (nullable ABURitInfo *)getShowEcpmInfo;
|
||||
|
||||
/// 填充后可调用, 返回广告缓存池内所有信息;nil为无权限
|
||||
- (NSArray<ABURitInfo *> *)cacheRitList;
|
||||
|
||||
/// 广告的扩展信息,可能为nil
|
||||
- (NSDictionary *_Nullable)extraData;
|
||||
|
||||
/// 填充后可调用,获取广告中的extra信息。目前只支持穿山甲,并且只支持获取coupon, live_room, product信息。
|
||||
- (nullable NSDictionary *)getMediaExtraInfo;
|
||||
|
||||
/// 不再使用加载成功后回调的view时,可调用该方法释放占用的内存
|
||||
- (void)destory;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/// banner广告位下混用了信息流代码位
|
||||
@interface ABUBannerAd (mixture)
|
||||
|
||||
/// 是否使用模板广告,只对支持模板广告的第三方SDK有效,默认为NO,仅在广告加载前设置有效,优先以平台配置为准
|
||||
@property (nonatomic, assign) BOOL getExpressAdIfCan;
|
||||
|
||||
/// 图片大小,包括视频媒体的大小设定
|
||||
@property (nonatomic, assign) CGSize imageOrVideoSize;
|
||||
|
||||
/// 是否静音播放视频,是否真实静音由adapter确定,默认为YES,仅在广告加载前设置有效,优先以平台配置为准
|
||||
@property (nonatomic, assign) BOOL startMutedIfCan;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35c83abf4ae83dd44a04a02555248409
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// ABUBaseAd.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ABUAdSDKConst.h"
|
||||
#import "ABURitInfo.h"
|
||||
#import "ABUAdLoadInfo.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 基类广告
|
||||
@interface ABUBaseAd : NSObject
|
||||
|
||||
/// 广告位ID
|
||||
@property (nonatomic, copy, readonly) NSString *rit;
|
||||
|
||||
/// 广告场景ID
|
||||
@property (nonatomic, copy, nullable) NSString *scenarioID;
|
||||
|
||||
/// 广告是否加载中
|
||||
@property (nonatomic, assign, readonly) BOOL isLoading;
|
||||
|
||||
/// 添加参数
|
||||
/// @param param 参数值
|
||||
/// @param key 参数key
|
||||
- (void)addParam:(id)param withKey:(NSString *)key;
|
||||
|
||||
/// 加载广告
|
||||
- (void)loadAdData;
|
||||
|
||||
/// 一次waterfall中各adn代码位加载广告失败原因,建议调用时机:展示广告时/超时时/全部返回报错时;返回nil表示一次加载无代码位加载失败或其加载无响应
|
||||
- (NSArray<NSDictionary *> *)waterfallFillFailMessages;
|
||||
|
||||
/// 同`waterfallFillFailMessages`,返回数据为`ABUAdLoadInfo`类型
|
||||
- (NSArray<ABUAdLoadInfo *> *)getAdLoadInfoList;
|
||||
|
||||
/// 在Bididing结束后是否回调ADN结果,默认NO
|
||||
@property (nonatomic, assign) BOOL bidNotify;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40b992dd501cfbc4799ef61b07c98b47
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ABUCanvasView.h
|
||||
// Ads-Mediation-CN
|
||||
//
|
||||
// Created by ByteDance on 2022/4/6.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ABUMediatedNativeAd.h"
|
||||
#import "ABUMediatedNativeAdData.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface ABUCanvasView : UIView
|
||||
|
||||
- (instancetype)initWithNativeAd:(ABUMediatedNativeAd *)nativeAd adapter:(id)adapter;
|
||||
|
||||
/// 非模板Native广告的物料数据,模板广告时为nil
|
||||
@property (nonatomic, strong, readonly, nullable) ABUMaterialMeta *data;
|
||||
|
||||
@end
|
||||
|
||||
/// native广告视图类,非模板部分
|
||||
/// 📢 以下描述需开发者自己渲染UI内容处,存在部分AND已强制处理或adapter代为处理,外部开发者需注意
|
||||
@interface ABUCanvasView (Native)
|
||||
|
||||
/// 是否支持自定义事件按钮,如果为YES,开发者可以配置 callToActionBtn 的UI数值,默认为YES
|
||||
@property (nonatomic, assign, readonly) BOOL hasSupportActionBtn;
|
||||
|
||||
/// 广告标题,需要开发者根据广告物料自己指定展示内容
|
||||
@property (nonatomic, strong, readonly, nonnull) UILabel *titleLabel;
|
||||
|
||||
/// 广告描述,需要开发者根据广告物料自己指定展示内容
|
||||
@property (nonatomic, strong, readonly, nonnull) UILabel *descLabel;
|
||||
|
||||
/// 广告图标,可能不存在,需要开发者根据广告物料自己指定展示内容
|
||||
@property (nonatomic, strong, nullable) UIImageView *iconImageView;
|
||||
|
||||
/// 广告大图,需要开发者根据广告物料自己指定展示内容,系统会自动创建,但内容需开发者自行校验
|
||||
@property (nonatomic, strong, readonly, nonnull) UIImageView *imageView;
|
||||
|
||||
/// Ad CTA button. Need to be assigned from a data(ABUMaterialMeta), and need to be add to self(ABUNativeAdView).
|
||||
|
||||
/// 广告详情/下载按钮,可能不存在,文案内容需要开发者根据广告物料自己获取
|
||||
@property (nonatomic, strong, readonly, nonnull) UIButton *callToActionBtn;
|
||||
|
||||
/// 广告商视图,可能不存在,开发者可自行赋值处理
|
||||
@property (nonatomic, strong, nullable) UIView *advertiserView;
|
||||
|
||||
/// 广告关闭按钮,可能不存在,开发者需自行处理响应事件
|
||||
@property (nonatomic, strong, nullable) UIButton *dislikeBtn;
|
||||
|
||||
/// 广告LOGO视图,可能不存在,需要开发者根据广告物料自己指定展示内容
|
||||
@property (nonatomic, strong, nullable) UIView *adLogoView;
|
||||
|
||||
/// 媒体视图,即视频广告的视频图层,非视频广告不存在该视图
|
||||
@property (nonatomic, strong, readonly, nullable) UIView *mediaView;
|
||||
|
||||
/// 注册可点击区域,由GroMore透传数据,是否生效由adapter 和 adn 决定
|
||||
/// @param views 可响应点击操作的视图
|
||||
- (void)registerClickableViews:(nullable NSArray<UIView *> *)views;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0255dd3e15250cb4db4cd941266b02f9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// ABUCardViewProperty.h
|
||||
// Ads-Mediation-CN
|
||||
//
|
||||
// Created by ByteDance on 2022/5/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ABUCardViewProperty : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe63214859dc65c4485f703001687989
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ABUCustomAdapter.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ABUCustomConfigAdapter;
|
||||
@class ABUMediaBidResult;
|
||||
|
||||
typedef NS_ENUM(NSInteger, ABUMediatedAdStatusValue) {
|
||||
ABUMediatedAdStatusValueDeny = -1,
|
||||
ABUMediatedAdStatusValueUnknown = 0,
|
||||
ABUMediatedAdStatusValueSure = 1,
|
||||
};
|
||||
|
||||
/// adn广告状态
|
||||
typedef struct {
|
||||
ABUMediatedAdStatusValue isReady;
|
||||
ABUMediatedAdStatusValue unexpired;
|
||||
ABUMediatedAdStatusValue valid;
|
||||
} ABUMediatedAdStatus;
|
||||
|
||||
extern const ABUMediatedAdStatus ABUMediatedAdStatusUnknown;
|
||||
|
||||
extern const ABUMediatedAdStatus ABUMediatedAdStatusNormal;
|
||||
|
||||
static inline
|
||||
BOOL ABUMediatedAdStatusEqualsTo(ABUMediatedAdStatus aStatus, ABUMediatedAdStatus anotherStatus) {
|
||||
return aStatus.isReady == anotherStatus.isReady &&
|
||||
aStatus.unexpired == anotherStatus.unexpired &&
|
||||
aStatus.valid == anotherStatus.valid;
|
||||
}
|
||||
|
||||
static inline
|
||||
ABUMediatedAdStatus ABUMediatedAdStatusMake(ABUMediatedAdStatusValue isReady, ABUMediatedAdStatusValue unexpired, ABUMediatedAdStatusValue valid) {
|
||||
ABUMediatedAdStatus status = {ABUMediatedAdStatusValueUnknown, ABUMediatedAdStatusValueUnknown , ABUMediatedAdStatusValueUnknown};
|
||||
status.isReady = isReady;
|
||||
status.unexpired = unexpired;
|
||||
status.valid = valid;
|
||||
return status;
|
||||
}
|
||||
|
||||
/// 自定义adapter广告类型基本协议
|
||||
@protocol ABUCustomAdapter <NSObject>
|
||||
@optional
|
||||
|
||||
- (NSString *)serverBiddingTokenWithParams:(NSDictionary *)params error:(NSError **)error;
|
||||
|
||||
/// 需要传递token以外值时,使用此方法
|
||||
- (NSString *)serverBiddingTokenWithParams:(NSDictionary *)params otherInfo:(NSMutableDictionary *)otherInfo error:(NSError **)error;
|
||||
|
||||
/// 当前广告有广告正在展示时是否允许进行预加载广告,未实现则为NO。
|
||||
- (BOOL)enablePreloadWhenCurrentIsDisplay;
|
||||
|
||||
/// 回调客户端竞价结果,比价成功时回传成功,比价失败、返回超时或价格低于竞价底价时回传失败
|
||||
/// @param result bid结果对象
|
||||
/// @warning 1.创建广告时需设置bidNotify属性为YES才会触发该回调
|
||||
/// 2.adn广告load失败不触发该回调,如需回传adn竞价结果,请在load失败处自行处理
|
||||
/// 3.信息流加载多条会触发多次,返回每条比价结果
|
||||
- (void)didReceiveBidResult:(nonnull ABUMediaBidResult *)result;
|
||||
|
||||
/// 开发者无需实现,系统自动生成
|
||||
@property (nonatomic, assign) BOOL isCustomAdapter;
|
||||
|
||||
/// 开发者无需实现,系统自动生成
|
||||
@property (nonatomic, strong) id<ABUCustomConfigAdapter> configAdapter;
|
||||
|
||||
@end
|
||||
|
||||
@protocol ABUBaseCustomAdapter <ABUCustomAdapter>
|
||||
|
||||
- (id)bridge;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7455ab8f54a75645b4c46c061f62e5b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// ABUCustomAdapterVersion.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by bytedance on 2021/9/30.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class ABUCustomAdapterVersion;
|
||||
|
||||
/// 自定义adapter协议版本,版本号 1.0
|
||||
extern ABUCustomAdapterVersion * const ABUCustomAdapterVersion1_0;
|
||||
/// 自定义adapter协议版本,版本号 1.1
|
||||
extern ABUCustomAdapterVersion * const ABUCustomAdapterVersion1_1;
|
||||
|
||||
/// 自定义adapter使用的协议版本,请开发者实现/更新自定义adapter时使用最新版本的版本号即可
|
||||
/// GroMore会根据实际情况控制adapter是否可用,[及时更新]
|
||||
@interface ABUCustomAdapterVersion : NSString @end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbbb1f82bbcced442836142ed99e60b5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// ABUCustomBannerAdapter.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUCustomAdapter.h"
|
||||
#import "ABUCustomBannerAdapterBridge.h"
|
||||
#import "ABUCustomNativeAdapter.h"
|
||||
@protocol ABUCustomBannerMixNativeAdapter;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 自定义banner广告adapter协议
|
||||
@protocol ABUCustomBannerAdapter <ABUCustomAdapter, ABUCustomBannerMixNativeAdapter>
|
||||
|
||||
/// 必要,加载banner广告方法
|
||||
/// @param slotID adn的广告位ID
|
||||
/// @param adSize 广告展示尺寸
|
||||
/// @param parameter 广告加载参数
|
||||
- (void)loadBannerAdWithSlotID:(NSString *)slotID andSize:(CGSize)adSize parameter:(nullable NSDictionary *)parameter;
|
||||
|
||||
/// 当前加载的广告的状态
|
||||
- (ABUMediatedAdStatus)mediatedAdStatus;
|
||||
|
||||
@optional
|
||||
/// 代理,开发者需使用该对象回调事件,Objective-C下自动生成无需设置,Swift需声明
|
||||
@property (nonatomic, weak, nullable) id<ABUCustomBannerAdapterBridge> bridge;
|
||||
|
||||
@end
|
||||
|
||||
/// 当Banner广告位下混用信息流代码位,请实现如下协议方法
|
||||
@protocol ABUCustomBannerMixNativeAdapter
|
||||
|
||||
@optional
|
||||
|
||||
/// 注册容器和可点击区域
|
||||
/// @param containerView 容器视图
|
||||
/// @param views 可点击视图组
|
||||
- (void)registerContainerView:(__kindof UIView *)containerView andClickableViews:(NSArray<__kindof UIView *> *)views forNativeAd:(id)nativeAd;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fc5db4ebe3850e4a86cd492c9c0de10
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ABUCustomBannerAdapterBridge.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUCustomAdapter.h"
|
||||
#import "ABUDislikeWords.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ABUCustomBannerAdapter;
|
||||
|
||||
/// 自定义banner广告的回调代理协议
|
||||
@protocol ABUCustomBannerAdapterBridge <NSObject>
|
||||
@optional
|
||||
|
||||
/// 在广告加载成功时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param bannerView 广告视图
|
||||
/// @param ext 回传信息
|
||||
- (void)bannerAd:(id<ABUCustomBannerAdapter>)adapter didLoad:(UIView *)bannerView ext:(NSDictionary *)ext;
|
||||
|
||||
/// 在广告加载失败时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
/// @param ext 回传信息
|
||||
- (void)bannerAd:(id<ABUCustomBannerAdapter>)adapter didLoadFailWithError:(NSError *_Nullable)error ext:(NSDictionary *)ext;
|
||||
|
||||
/// 在广告已经展示的时候调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdDidBecomeVisible:(id<ABUCustomBannerAdapter>)adapter bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 在广告弹出详情页或者展示展示appstore时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdWillPresentFullScreenModal:(id<ABUCustomBannerAdapter>)adapter bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 在广告关闭详情页或者appstore时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdWillDismissFullScreenModal:(id<ABUCustomBannerAdapter>)adapter bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 在广告触发点击事件时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param bannerView 广告视图
|
||||
- (void)bannerAdDidClick:(id<ABUCustomBannerAdapter>)adapter bannerView:(UIView *)bannerView;
|
||||
|
||||
/// 在广告关闭时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param bannerView 广告视图
|
||||
/// @param filterWords 用户手动关闭时的关闭原因描述
|
||||
- (void)bannerAd:(id<ABUCustomBannerAdapter>)adapter bannerView:(UIView *)bannerView didClosedWithDislikeWithReason:(NSArray<ABUDislikeWords *> *_Nullable)filterWords;
|
||||
|
||||
/// 广告点击跳转使用的控制器
|
||||
- (UIViewController *)viewControllerForPresentingModalView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c73298e4085ec4f4383ad09b37217d51
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ABUCustomConfigAdapter.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by Makaiwen on 2021/5/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUSdkInitConfig.h"
|
||||
|
||||
#import "ABUCustomBannerAdapter.h"
|
||||
#import "ABUCustomInterstitialAdapter.h"
|
||||
#import "ABUCustomRewardedVideoAdapter.h"
|
||||
#import "ABUCustomFullscreenVideoAdapter.h"
|
||||
#import "ABUCustomDrawAdapter.h"
|
||||
#import "ABUCustomSplashAdapter.h"
|
||||
#import "ABUCustomNativeAdapter.h"
|
||||
#import "ABUCustomAdapterVersion.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 自定义adapter的基本配置协议
|
||||
@protocol ABUCustomConfigAdapter <NSObject>
|
||||
@required
|
||||
|
||||
/// 该自定义adapter是基于哪个版本实现的,填写编写时的最新值即可,GroMore会根据该值进行兼容处理
|
||||
- (ABUCustomAdapterVersion *)basedOnCustomAdapterVersion;
|
||||
|
||||
/// adn初始化方法
|
||||
/// @param initConfig 初始化配置,包括appid、appkey基本信息和部分用户传递配置
|
||||
- (void)initializeAdapterWithConfiguration:(ABUSdkInitConfig *_Nullable)initConfig;
|
||||
|
||||
/// adapter的版本号
|
||||
- (NSString *_Nonnull)adapterVersion;
|
||||
|
||||
/// adn的版本号
|
||||
- (NSString *_Nonnull)networkSdkVersion;
|
||||
|
||||
/// 隐私权限更新,用户更新隐私配置时触发,初始化方法调用前一定会触发一次
|
||||
- (void)didRequestAdPrivacyConfigUpdate:(NSDictionary *)config;
|
||||
|
||||
/// 收到配置更新请求时触发,如主题更新,初始化时设定配置不会触发,具体修改项需自行校验
|
||||
- (void)didReceiveConfigUpdateRequest:(ABUUserConfig *)config;
|
||||
|
||||
@optional
|
||||
|
||||
/// 无需实现
|
||||
@property (nonatomic, assign) BOOL isCustomAdapter;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f389eff8bc6300f41a8a754ce4b736aa
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ABUCustomDrawVideoAdapte.h
|
||||
// Ads-Mediation-CN
|
||||
//
|
||||
// Created by heyinyin on 2022/3/31.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUCustomAdapter.h"
|
||||
#import "ABUCustomDrawAdapterBridge.h"
|
||||
#import "ABUVideoAdReportSupport.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 自定义Draw视频广告的adapter广告协议
|
||||
@protocol ABUCustomDrawAdapter <ABUCustomAdapter>
|
||||
|
||||
/// 加载广告的方法
|
||||
/// @param slotID adn的广告位ID
|
||||
/// @param parameter 广告加载的参数
|
||||
- (void)loadDrawAdWithSlotID:(NSString *)slotID andSize:(CGSize)size andParameter:(NSDictionary *)parameter;
|
||||
|
||||
@optional
|
||||
/// 渲染广告,为模板广告时会回调该方法,需对广告进行渲染
|
||||
/// @param expressAdView 模板广告
|
||||
- (void)renderForExpressAdView:(UIView *)expressAdView;
|
||||
|
||||
/// 为模板广告设置控制器
|
||||
/// @param viewController 控制器
|
||||
/// @param expressAdView 模板广告
|
||||
- (void)setRootViewController:(UIViewController *)viewController forExpressAdView:(UIView *)expressAdView;
|
||||
|
||||
/// 为非模板广告设置控制器
|
||||
/// @param viewController 控制器
|
||||
/// @param drawAd 非模板广告
|
||||
- (void)setRootViewController:(UIViewController *)viewController forDrawAd:(id)drawAd;
|
||||
|
||||
/// 注册容器和可点击区域
|
||||
/// @param containerView 容器视图
|
||||
/// @param views 可点击视图组
|
||||
- (void)registerContainerView:(__kindof UIView *)containerView andClickableViews:(NSArray<__kindof UIView *> *)views forDrawAd:(id)drawAd;
|
||||
|
||||
/// 代理,开发者需使用该对象回调事件,Objective-C下自动生成无需设置,Swift需声明
|
||||
@property (nonatomic, weak, nullable) id<ABUCustomDrawAdapterBridge> bridge;
|
||||
|
||||
/// 当前加载的广告的状态,draw模板广告
|
||||
- (ABUMediatedAdStatus)mediatedAdStatusWithExpressView:(UIView *)view;
|
||||
|
||||
/// 当前加载的广告的状态,draw非模板广告
|
||||
- (ABUMediatedAdStatus)mediatedAdStatusWithMediatedAd:(ABUMediatedNativeAd *)ad;
|
||||
|
||||
/// 广告视图即将被展示回调,只会调用一次
|
||||
/// @param expressAdView 模板广告视图
|
||||
/// @param drawAd GroMore包装的广告数据
|
||||
- (void)adViewWillAddToSuperViewWithExpressAdView:(__kindof UIView *)expressAdView orMediatedAd:(ABUMediatedNativeAd *)drawAd;
|
||||
|
||||
/// 上报dislike的原因,仅限非模板广告自定义关闭按钮时使用
|
||||
/// @param ad GroMore包装的非模板广告数据
|
||||
/// @param reasons dislike的原因。数据基于ADN提供的原因修改
|
||||
- (void)reportDislikeAd:(ABUMediatedNativeAd *)ad withReasons:(NSArray<ABUDislikeReason *> *)reasons;
|
||||
|
||||
- (void)reportVideoEvent:(ABUVideoAdEvent)event forAd:(ABUMediatedNativeAd *)ad withParameters:(NSDictionary *)parameters;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36693c04d77623b4db5e14a1a739ee5f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ABUCustomDrawAdapterBridge.h
|
||||
// Ads-Mediation-CN
|
||||
//
|
||||
// Created by heyinyin on 2022/3/31.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUMediatedNativeAd.h"
|
||||
#import "ABUPlayerPlayState.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol ABUCustomDrawAdapter;
|
||||
|
||||
/// 自定义Draw视频广告的adapter的回调协议
|
||||
@protocol ABUCustomDrawAdapterBridge <NSObject>
|
||||
|
||||
@optional
|
||||
/// 在广告加载完成时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param ads 广告数据组 模板为视图类型数组,非模板为ABUMediatedNativeAd类型数组
|
||||
/// @param exts 扩展信息组 key值请参照ABUMediaAdLoadingExt*****,与ads一一对应
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter didLoadWithDrawAds:(NSArray *_Nullable)ads exts:(NSArray<NSDictionary *> * _Nullable)exts;
|
||||
|
||||
/// 在广告加载失败时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter didLoadFailWithError:(NSError *_Nullable)error;
|
||||
|
||||
/// 广告点击跳转使用的控制器
|
||||
- (UIViewController *)viewControllerForPresentingModalView;
|
||||
|
||||
#pragma mark - View
|
||||
|
||||
/// 广告展示时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter didVisibleWithMediatedAd:(id _Nonnull)drawAd;
|
||||
|
||||
/// 广告点击事件时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter didClickWithMediatedAd:(id _Nonnull)drawAd;
|
||||
|
||||
/// 在广告即将展示详情页或者app store时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter willPresentFullScreenModalWithMediatedAd:(id _Nonnull)drawAd;
|
||||
|
||||
/// 在广告关闭详情页或者appstore时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter willDismissFullScreenModalWithMediatedAd:(id _Nonnull)drawAd;
|
||||
|
||||
/// 仅限自渲染广告,在广告关闭的时候调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd)
|
||||
/// @param filterWords 用户手动关闭时的关闭原因描述
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter didCloseWithMediatedAd:(id _Nonnull)drawAd closeReasons:(NSArray<ABUDislikeWords *> *_Nullable)filterWords;
|
||||
|
||||
#pragma mark - Express ad
|
||||
/// 仅限模板广告,在渲染成功或者模板广告的尺寸更新时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param expressView 模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter renderSuccessWithExpressView:(UIView *_Nonnull)expressView;
|
||||
|
||||
/// 仅限模板广告,在渲染失败调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param expressView 模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter renderFailWithExpressView:(UIView *_Nonnull)expressView andError:(NSError *_Nonnull)error;
|
||||
|
||||
/// 仅限模板广告,在模板广告关闭的时候调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param expressView 模板广告请传递上报expressView
|
||||
/// @param filterWords 用户手动关闭时的关闭原因描述
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter didCloseWithExpressView:(UIView *_Nonnull)expressView closeReasons:(NSArray<ABUDislikeWords *> *_Nullable)filterWords;
|
||||
#pragma mark - video
|
||||
|
||||
/// 视频广告中视频播放状态变更的时候调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param state 播放状态
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter videoStateDidChangedWithState:(ABUPlayerPlayState)state andMediatedAd:(id _Nonnull)drawAd;
|
||||
|
||||
/// 视频广告中视频视图被点击时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter videoDidClick:(id _Nonnull)drawAd;
|
||||
|
||||
/// 视频广告中视频播放完成时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param drawAd 自渲染广告请传递原始数据(即ABUMediatedNativeAd.originMediatedNativeAd),模板广告请传递上报expressView
|
||||
- (void)drawAd:(id<ABUCustomDrawAdapter>_Nonnull)adapter videoDidPlayFinish:(id _Nonnull)drawAd;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 899ef2ac0117a4740ba942046448edea
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// ABUCustomFullscreenVideoAdapter.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by bytedance on 2021/6/8.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUCustomAdapter.h"
|
||||
#import "ABUCustomFullscreenVideoAdapterBridge.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 自定义全屏视频广告的adapter广告协议
|
||||
@protocol ABUCustomFullscreenVideoAdapter <ABUCustomAdapter>
|
||||
|
||||
/// 加载广告的方法
|
||||
/// @param slotID adn的广告位ID
|
||||
/// @param parameter 广告加载的参数
|
||||
- (void)loadFullscreenVideoAdWithSlotID:(NSString *)slotID andParameter:(NSDictionary *)parameter;
|
||||
|
||||
/// 展示广告的方法
|
||||
/// @param viewController 控制器对象
|
||||
/// @param parameter 展示广告的参数,由GroMore接入媒体配置
|
||||
- (BOOL)showAdFromRootViewController:(UIViewController *_Nonnull)viewController parameter:(NSDictionary *)parameter;
|
||||
|
||||
/// 当前加载的广告的状态
|
||||
- (ABUMediatedAdStatus)mediatedAdStatus;
|
||||
|
||||
@optional
|
||||
/// 代理,开发者需使用该对象回调事件,Objective-C下自动生成无需设置,Swift需声明
|
||||
@property (nonatomic, weak, nullable) id<ABUCustomFullscreenVideoAdapterBridge> bridge;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9c4d66dd3d21684bbdd5eee13f75d2e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ABUCustomFullscreenVideoAdapterBridge.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by bytedance on 2021/6/8.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUAdapterRewardAdInfo.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol ABUCustomFullscreenVideoAdapter;
|
||||
|
||||
/// 自定义全屏视频广告的adapter的回调协议
|
||||
@protocol ABUCustomFullscreenVideoAdapterBridge <NSObject>
|
||||
@optional
|
||||
|
||||
/// 在广告加载完成时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param ext 回传信息
|
||||
- (void)fullscreenVideoAd:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter didLoadWithExt:(NSDictionary *)ext;
|
||||
|
||||
/// 在广告加载失败时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
/// @param ext 回传信息
|
||||
- (void)fullscreenVideoAd:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter didLoadFailWithError:(NSError *_Nullable)error ext:(NSDictionary *)ext;
|
||||
|
||||
/// 在广告中视频素材加载完成时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdVideoDidLoad:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告已经展示时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdDidVisible:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 广告展示失败的时候调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
- (void)fullscreenVideoAdDidShowFailed:(id<ABUCustomFullscreenVideoAdapter>)adapter error:(NSError *)error;
|
||||
|
||||
/// 在广告关闭时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdDidClose:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告点击事件触发时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdDidClick:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告即将展示详情页或者app store时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdWillPresentFullscreenModal:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告视频播放完成时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
- (void)fullscreenVideoAd:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter didPlayFinishWithError:(nullable NSError *)error;
|
||||
|
||||
/// 在广告被点击跳过时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdDidClickSkip:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在模板广告渲染成功时调用,非模板广告无需调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)fullscreenVideoAdRenderSuccess:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告渲染失败时调用,非模板广告无需调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
- (void)fullscreenVideoAd:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter renderFailedWithError:(NSError *)error;
|
||||
|
||||
/// 广告点击跳转使用的控制器
|
||||
- (UIViewController *)viewControllerForPresentingModalView;
|
||||
|
||||
/// 在ADN验证激励成功时调用,直接调用即可,无需做响应判断:目前支持的adn:GDT
|
||||
/// @param adapter 当前适配器
|
||||
/// @param infoBuilder 激励信息
|
||||
- (void)rewardedVideoAd:(id<ABUCustomFullscreenVideoAdapter>_Nonnull)adapter didServerRewardSuccessWithInfo:(void(^)(ABUAdapterRewardAdInfo *info))infoBuilder;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8d601cc8d2ed344081938796ecb008b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// ABUCustomInterstitialAdapter.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by bytedance on 2021/6/6.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ABUCustomAdapter.h"
|
||||
#import "ABUCustomInterstitialAdapterBridge.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 自定义插屏广告的adapter广告协议
|
||||
@protocol ABUCustomInterstitialAdapter <ABUCustomAdapter>
|
||||
|
||||
/// 加载广告的方法
|
||||
/// @param slotID adn的广告位ID
|
||||
/// @param size 广告展示尺寸
|
||||
/// @param parameter 广告加载的参数
|
||||
- (void)loadInterstitialAdWithSlotID:(NSString *)slotID andSize:(CGSize)size parameter:(NSDictionary *)parameter;
|
||||
|
||||
/// 展示广告的方法
|
||||
/// @param viewController 控制器对象
|
||||
/// @param parameter 展示广告的参数,由GroMore接入媒体配置
|
||||
- (BOOL)showAdFromRootViewController:(UIViewController *_Nonnull)viewController parameter:(NSDictionary *)parameter;
|
||||
|
||||
/// 当前加载的广告的状态
|
||||
- (ABUMediatedAdStatus)mediatedAdStatus;
|
||||
|
||||
@optional
|
||||
/// 代理,开发者需使用该对象回调事件,Objective-C下自动生成无需设置,Swift需声明
|
||||
@property (nonatomic, weak, nullable) id<ABUCustomInterstitialAdapterBridge> bridge;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc2a68749e551c8439fb45031d6bbb48
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ABUCustomInterstitialAdapterBridge.h
|
||||
// ABUAdSDK
|
||||
//
|
||||
// Created by bytedance on 2021/6/6.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol ABUCustomInterstitialAdapter;
|
||||
|
||||
/// 自定义插屏广告的adapter的回调协议
|
||||
@protocol ABUCustomInterstitialAdapterBridge <NSObject>
|
||||
@optional
|
||||
|
||||
/// 在广告加载完成时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param ext 回传信息
|
||||
- (void)interstitialAd:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter didLoadWithExt:(NSDictionary *)ext;
|
||||
|
||||
/// 在广告加载失败时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
/// @param ext 回传信息
|
||||
- (void)interstitialAd:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter didLoadFailWithError:(NSError *_Nullable)error ext:(NSDictionary *)ext;
|
||||
|
||||
/// 在广告已经展示时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)interstitialAdDidVisible:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 广告展示失败的时候调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
- (void)interstitialAdDidShowFailed:(id<ABUCustomInterstitialAdapter>)adapter error:(NSError *)error;
|
||||
|
||||
/// 在广告关闭时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)interstitialAdDidClose:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告点击事件触发时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)interstitialAdDidClick:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告即将展示详情页或者app store时调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)interstitialAdWillPresentFullScreenModal:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告关闭详情页或者appstore时调用该方法,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)interstitialAdWillDismissFullScreenModal:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在模板广告渲染成功时调用,非模板广告无需调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
- (void)interstitialAdRenderSuccess:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter;
|
||||
|
||||
/// 在广告渲染失败时调用,非模板广告无需调用,直接调用即可,无需做响应判断
|
||||
/// @param adapter 当前适配器
|
||||
/// @param error 错误信息
|
||||
- (void)interstitialAd:(id<ABUCustomInterstitialAdapter>_Nonnull)adapter renderFailedWithError:(NSError *)error;
|
||||
|
||||
/// 广告点击跳转使用的控制器
|
||||
- (UIViewController *)viewControllerForPresentingModalView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user