5933
This commit is contained in:
parent
994ee8acaf
commit
e0e3837cf0
|
|
@ -0,0 +1,28 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4cc185bda17d243b4a525e2d328f0e10
|
||||||
|
folderAsset: yes
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 81f783e9a5e5548f99b74a13346daf07
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9aa7d2c7282ff44e199f10e8495491a6
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// AnyThinkGDTAdapter.h
|
||||||
|
// AnyThinkGDTAdapter
|
||||||
|
//
|
||||||
|
// Created by Topon on 11/11/20.
|
||||||
|
// Copyright © 2020 AnyThink. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
//! Project version number for AnyThinkGDTAdapter.
|
||||||
|
FOUNDATION_EXPORT double AnyThinkGDTAdapterVersionNumber;
|
||||||
|
|
||||||
|
//! Project version string for AnyThinkGDTAdapter.
|
||||||
|
FOUNDATION_EXPORT const unsigned char AnyThinkGDTAdapterVersionString[];
|
||||||
|
|
||||||
|
// In this header, you should import all the public headers of your framework using statements like #import <AnyThinkGDTAdapter/PublicHeader.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b573a260c13814cfb85cdbdcbc9de5ab
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 09d2f5723e58b4100aa55963e99ddf57
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 296125ea5463b4bedb0aaa59f817a69c
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
framework module AnyThinkGDTAdapter {
|
||||||
|
umbrella header "AnyThinkGDTAdapter.h"
|
||||||
|
|
||||||
|
export *
|
||||||
|
module * { export * }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3112e519450924557ad1329248299c7b
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
//
|
||||||
|
// GDTAdParams.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2020/4/30.
|
||||||
|
// Copyright © 2020 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface GDTAdParams : NSObject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告大小,模板 2.0 信息流广告使用。当 height = 0,自动根据 width 算高;当 height > 0,直接使用传入的 width、height 作为模板容器 View 的大小。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) CGSize adSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 非 WiFi 网络,视频广告是否自动播放。默认 NO。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoAutoPlayOnWWAN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频广告自动播放时,是否静音。默认 YES。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页播放时是否静音。默认NO。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL detailPageVideoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长下限。
|
||||||
|
以下两种情况会使用 0,1:不设置 2:minVideoDuration大于maxVideoDuration
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger minVideoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长上限,视频时长有效值范围为[5,180]。
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger maxVideoDuration;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e675fe963679549f3995224c1eef4375
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,31 @@
|
||||||
|
//
|
||||||
|
// GDTAdProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by rowanzhang on 2021/12/23.
|
||||||
|
// Copyright © 2021 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GDTAdProtocol_h
|
||||||
|
#define GDTAdProtocol_h
|
||||||
|
|
||||||
|
#define GDT_REQ_ID_KEY @"request_id"
|
||||||
|
|
||||||
|
@protocol GDTAdProtocol <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
- (NSDictionary *)extraInfo;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol GDTAdDelegate <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
投诉成功回调
|
||||||
|
@params ad 广告对象实例
|
||||||
|
*/
|
||||||
|
- (void)gdtAdComplainSuccess:(id)ad;
|
||||||
|
|
||||||
|
@end
|
||||||
|
#endif /* GDTAdProtocol_h */
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5efcb74bba8c54a17ae83db937e007c6
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,20 @@
|
||||||
|
//
|
||||||
|
// GDTAdDebugSetting.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by Nancy on 2020/8/12.
|
||||||
|
// Copyright © 2020 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
提供一些配置,用于在开发调试阶段使用
|
||||||
|
*/
|
||||||
|
@interface GDTAdTestSetting : NSObject
|
||||||
|
@property (nonatomic, copy, nullable) NSString *playableUrl;//测试时使用的试玩广告地址
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 50968814b40074298a45508ed701d2e2
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,46 @@
|
||||||
|
//
|
||||||
|
// GDTBaseAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/7/25.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTBaseAdNetworkAdapterProtocol <GDTAdProtocol>
|
||||||
|
|
||||||
|
+ (void)updateAppId:(NSString *)appId extStr:(NSString *)extStr;
|
||||||
|
|
||||||
|
- (nullable instancetype)initWithAdNetworkConnector:(id)connector
|
||||||
|
posId:(NSString *)posId;
|
||||||
|
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
- (BOOL)isContractAd;
|
||||||
|
|
||||||
|
//发送竞胜结果
|
||||||
|
- (void)sendWinNotification:(NSInteger)price;
|
||||||
|
|
||||||
|
//发送竞败结果
|
||||||
|
- (void)sendLossNotification:(NSInteger)price reason:(NSInteger)reason adnId:(NSString *__nullable)adnId;
|
||||||
|
|
||||||
|
//设置实际结算价
|
||||||
|
- (void)setBidECPM:(NSInteger)price;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol GDTBaseAdNetworkConnectorProtocol <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
- (void)adapter_adComplainSuccess:(id)adapter;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6fc116f1b906b4ea6a4e5f8bd214ab99
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,77 @@
|
||||||
|
//
|
||||||
|
// GDTHybridAd.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/3/8.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
typedef NS_OPTIONS(NSInteger, GDTHybridAdOptions) {
|
||||||
|
GDTHybridAdOptionRewardVideo = 1 << 0
|
||||||
|
};
|
||||||
|
|
||||||
|
@class GDTHybridAd;
|
||||||
|
|
||||||
|
@protocol GDTHybridAdDelegate <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
- (void)gdt_hybridAdDidPresented:(GDTHybridAd *)hybridAd;
|
||||||
|
- (void)gdt_hybridAdDidClose:(GDTHybridAd *)hybridAd;
|
||||||
|
- (void)gdt_hybridAdLoadURLSuccess:(GDTHybridAd *)hybridAd;
|
||||||
|
- (void)gdt_hybridAd:(GDTHybridAd *)hybridAd didFailWithError:(NSError *)error;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTHybridAd : NSObject
|
||||||
|
|
||||||
|
/**
|
||||||
|
自定义浏览器 UI 属性,请在 showWithRootViewController: 方法前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *titleContent;
|
||||||
|
@property (nonatomic, strong) UIColor *titleColor;
|
||||||
|
@property (nonatomic, strong) UIFont *titleFont;
|
||||||
|
@property (nonatomic, strong) UIColor *navigationBarColor;
|
||||||
|
@property (nonatomic, strong) UIColor *navigationBarBottomColor;
|
||||||
|
@property (nonatomic, strong) UIColor *separatorLineColor;
|
||||||
|
@property (nonatomic, strong) UIImage *closeImage; // 如需自定义关闭图片,请按 44*44 大小设置
|
||||||
|
@property (nonatomic, strong) UIImage *backImage; // 如需自定义后退图片,请按 44*44 大小设置
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
委托对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id <GDTHybridAdDelegate> delegate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
构造方法
|
||||||
|
|
||||||
|
@param adOptions - 支持的广告类型 Options,激励视频请传 GDTHybridAdOptionRewardVideo
|
||||||
|
@return GDTHybrid 实例
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithType:(GDTHybridAdOptions)adOptions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
加载广告方法 支持 iOS8.1 及以上系统
|
||||||
|
|
||||||
|
@param url 加载的 X 中心 URL
|
||||||
|
*/
|
||||||
|
- (void)loadWithUrl:(NSString *)url;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
展示浏览器方法
|
||||||
|
|
||||||
|
@param rootViewController 用于 present 浏览器 VC
|
||||||
|
*/
|
||||||
|
- (void)showWithRootViewController:(UIViewController *)rootViewController;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6ef40de55a76b4d3eaba6a264c9f538a
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,31 @@
|
||||||
|
//
|
||||||
|
// GDTLoadAdParams.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by vicluo(罗翔) on 2019/4/26.
|
||||||
|
// Copyright © 2019年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
|
||||||
|
@interface GDTLoadAdParams : NSObject
|
||||||
|
|
||||||
|
//登陆账号类型:QQ or weixin
|
||||||
|
@property (nonatomic, assign) GDTSDKLoginType loginType;
|
||||||
|
|
||||||
|
//登陆账号体系分配的appID,如QQ分配的appID或是微信分配的appID
|
||||||
|
@property (nonatomic, copy) NSString *loginAppId;
|
||||||
|
|
||||||
|
//登陆账号体系分配的openID,如QQ分配的openId或是微信分配的openId
|
||||||
|
@property (nonatomic, copy) NSString *loginOpenId;
|
||||||
|
|
||||||
|
//透传字段,key跟value都由调用方自行指定
|
||||||
|
@property (nonatomic, strong) NSDictionary *dictionary;
|
||||||
|
|
||||||
|
//透传字段,非qq小游戏
|
||||||
|
@property (nonatomic, copy) NSDictionary *devExtra;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bb389d0d8b09847b7bc6ae810cb219ad
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,16 @@
|
||||||
|
//
|
||||||
|
// GDTLogoView.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2018/10/10.
|
||||||
|
// Copyright © 2018 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
//logo默认宽度
|
||||||
|
extern CGFloat const kGDTLogoImageViewDefaultWidth;
|
||||||
|
//logo默认高度
|
||||||
|
extern CGFloat const kGDTLogoImageViewDefaultHeight;
|
||||||
|
|
||||||
|
@interface GDTLogoView : UIImageView
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8ef39875e823947fb9c5bd3a79f462c8
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,90 @@
|
||||||
|
//
|
||||||
|
// GDTMediaView.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2018/10/10.
|
||||||
|
// Copyright © 2018 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
|
||||||
|
@class GDTMediaView;
|
||||||
|
@protocol GDTMediaViewDelegate <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
/**
|
||||||
|
用户点击 MediaView 回调,当 GDTVideoConfig userControlEnable 设为 YES,用户点击 mediaView 会回调。
|
||||||
|
|
||||||
|
@param mediaView 播放器实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_mediaViewDidTapped:(GDTMediaView *)mediaView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
播放完成回调
|
||||||
|
|
||||||
|
@param mediaView 播放器实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_mediaViewDidPlayFinished:(GDTMediaView *)mediaView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTMediaView : UIView
|
||||||
|
|
||||||
|
/**
|
||||||
|
GDTMediaView 回调对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id <GDTMediaViewDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频广告已播放时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
播放视频
|
||||||
|
*/
|
||||||
|
- (void)play;
|
||||||
|
|
||||||
|
/**
|
||||||
|
暂停视频,调用 pause 后,需要被暂停的视频广告对象,不会再自动播放,需要调用 play 才能恢复播放。
|
||||||
|
*/
|
||||||
|
- (void)pause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
停止播放,并展示第一帧
|
||||||
|
*/
|
||||||
|
- (void)stop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
播放静音开关
|
||||||
|
@param flag 是否静音
|
||||||
|
*/
|
||||||
|
- (void)muteEnable:(BOOL)flag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
自定义播放按钮
|
||||||
|
|
||||||
|
@param image 自定义播放按钮图片,不设置为默认图
|
||||||
|
@param size 自定义播放按钮大小,不设置为默认大小 44 * 44
|
||||||
|
*/
|
||||||
|
- (void)setPlayButtonImage:(UIImage *)image size:(CGSize)size;
|
||||||
|
|
||||||
|
#pragma mark - DEPRECATED
|
||||||
|
/**
|
||||||
|
是否支持在WWAN下自动播放视频, 默认 NO,已废弃,请使用 GDTVideoConfig 类配置
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoAutoPlayOnWWAN GDT_DEPRECATED_ATTRIBUTE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否静音播放视频广告, 默认 YES,已废弃,请使用 GDTVideoConfig 类配置
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted GDT_DEPRECATED_ATTRIBUTE;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: de94be0dd0d204bff99650c20e73cc26
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,195 @@
|
||||||
|
//
|
||||||
|
// GDTNativeExpressAd.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by michaelxing on 2017/4/17.
|
||||||
|
// Copyright © 2017年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
|
||||||
|
@class GDTNativeExpressAdView;
|
||||||
|
@class GDTNativeExpressAd;
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressAdDelegete <GDTAdDelegate>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
* 拉取原生模板广告成功
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdSuccessToLoad:(GDTNativeExpressAd *)nativeExpressAd views:(NSArray<__kindof GDTNativeExpressAdView *> *)views;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取原生模板广告失败
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdFailToLoad:(GDTNativeExpressAd *)nativeExpressAd error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告渲染成功, 此时的 nativeExpressAdView.size.height 根据 size.width 完成了动态更新。
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewRenderSuccess:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告渲染失败
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewRenderFail:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewExposure:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewClicked:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告被关闭
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewClosed:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击原生模板广告以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewWillPresentScreen:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击原生模板广告以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewDidPresentScreen:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewWillDismissScreen:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewDidDismissScreen:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详解:当点击应用下载或者广告调用系统程序打开时调用
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewApplicationWillEnterBackground:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板视频广告 player 播放状态更新回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdView:(GDTNativeExpressAdView *)nativeExpressAdView playerStatusChanged:(GDTMediaPlayerStatus)status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 WillPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewWillPresentVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 DidPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewDidPresentVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 WillDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewWillDismissVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 DidDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)nativeExpressAdViewDidDismissVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTNativeExpressAd : NSObject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 委托对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id<GDTNativeExpressAdDelegete> delegate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 非 WiFi 网络,是否自动播放。默认 NO。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
|
||||||
|
@property (nonatomic, assign) BOOL videoAutoPlayOnWWAN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动播放时,是否静音。默认 YES。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页播放时是否静音。默认NO。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL detailPageVideoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长下限。
|
||||||
|
以下两种情况会使用 0,1:不设置 2:minVideoDuration大于maxVideoDuration
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger minVideoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长上限,视频时长有效值范围为[5,180]。
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger maxVideoDuration;
|
||||||
|
|
||||||
|
@property (nonatomic, readonly) NSString *placementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法
|
||||||
|
* 详解:placementId - 广告位 ID
|
||||||
|
* adSize - 广告展示的宽高
|
||||||
|
*/
|
||||||
|
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId adSize:(CGSize)size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法, S2S bidding 后获取到 token 再调用此方法
|
||||||
|
* @param placementId 广告位 ID
|
||||||
|
* @param token 通过 Server Bidding 请求回来的 token
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId token:(NSString *)token adSize:(CGSize)size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
|
||||||
|
* 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
|
||||||
|
*/
|
||||||
|
- (void)setBidECPM:(NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取广告
|
||||||
|
* @param count 请求广告数量
|
||||||
|
*/
|
||||||
|
- (void)loadAd:(NSInteger)count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
*/
|
||||||
|
- (void)sendWinNotificationWithPrice:(NSInteger)price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞败之后调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
* @param reason - 优量汇广告竞败原因
|
||||||
|
* @param adnID - adnID
|
||||||
|
*/
|
||||||
|
- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告平台名称
|
||||||
|
|
||||||
|
@return 当使用流量分配功能时,用于区分广告平台;未使用时为空字符串
|
||||||
|
*/
|
||||||
|
- (NSString *)adNetworkName;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 622e7f80f539b463092a4c75bdebcfa3
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,29 @@
|
||||||
|
//
|
||||||
|
// GDTNativeExpressAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/11/27.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressAdNetworkConnectorProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol>
|
||||||
|
|
||||||
|
- (void)loadAdWithCount:(NSInteger)count;
|
||||||
|
|
||||||
|
@optional
|
||||||
|
@property (nonatomic, assign) BOOL videoAutoPlayOnWWAN;
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted;
|
||||||
|
@property (nonatomic, assign) BOOL detailPageVideoMuted;
|
||||||
|
@property (nonatomic, assign) NSInteger minVideoDuration;
|
||||||
|
@property (nonatomic, assign) NSInteger maxVideoDuration;
|
||||||
|
@property (nonatomic, assign) CGSize adSize;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c276b31a3375f411c9fdcfd3ea54e065
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,118 @@
|
||||||
|
//
|
||||||
|
// GDTNativeExpressAdNetworkConnectorProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/11/27.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressAdNetworkAdapterProtocol;
|
||||||
|
@protocol GDTNativeExpressAdViewAdapterProtocol;
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressAdNetworkConnectorProtocol <GDTBaseAdNetworkConnectorProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取原生模板广告成功
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdSuccessToLoad:(id<GDTNativeExpressAdNetworkAdapterProtocol>)adapter
|
||||||
|
viewAdapters:(NSArray<id<GDTNativeExpressAdViewAdapterProtocol>> *)
|
||||||
|
viewAdapters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取原生模板广告失败
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdFailToLoad:(id<GDTNativeExpressAdNetworkAdapterProtocol>)adapter
|
||||||
|
error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告渲染成功, 此时的 nativeExpressAdView.size.height 根据 size.width 完成了动态更新。
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterRenderSuccess:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告渲染失败
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterRenderFail:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterExposure:(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterClicked:(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板广告被关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterClosed:(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击原生模板广告以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterWillPresentScreen:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击原生模板广告以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterDidPresentScreen:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterWillDissmissScreen:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterDidDissmissScreen:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详解:当点击应用下载或者广告调用系统程序打开时调用
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterApplicationWillEnterBackground:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板视频广告 player 播放状态更新回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapter:(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter
|
||||||
|
playerStatusChanged:(GDTMediaPlayerStatus)status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 WillPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterWillPresentVideoViewController:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 DidPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterDidPresentVideoViewController:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 WillDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterWillDismissVideoViewController:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生视频模板详情页 DidDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_nativeExpressAdViewAdapterDidDismissVideoViewController:
|
||||||
|
(id<GDTNativeExpressAdViewAdapterProtocol>)viewAdapter;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b2faff8ac004d49bc94e50abb0f4f836
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,67 @@
|
||||||
|
//
|
||||||
|
// GDTNativeExpressAdView.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by michaelxing on 2017/4/14.
|
||||||
|
// Copyright © 2017年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
|
||||||
|
@interface GDTNativeExpressAdView : UIView <GDTAdProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否渲染完毕
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isReady;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是视频模板广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* viewControllerForPresentingModalView
|
||||||
|
* 详解:[必选]开发者需传入用来弹出目标页的ViewController,一般为当前ViewController
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) UIViewController *controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告是否有效,以下情况会返回NO,建议在调用render之前判断,当为NO时render失败
|
||||||
|
* a.广告过期
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isAdValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*[必选]
|
||||||
|
*原生模板广告渲染
|
||||||
|
*/
|
||||||
|
- (void)render;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频模板广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频模板广告已播放时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0d3b659c41ea74a0ea60caccce8fb665
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,42 @@
|
||||||
|
//
|
||||||
|
// GDTNativeExpressAdViewAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by rowanzhang on 2021/8/16.
|
||||||
|
// Copyright © 2021 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GDTNativeExpressAdViewAdapterProtocol_h
|
||||||
|
#define GDTNativeExpressAdViewAdapterProtocol_h
|
||||||
|
@class GDTNativeExpressAdView;
|
||||||
|
@protocol GDTAdProtocol;
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressAdViewAdapterProtocol <GDTAdProtocol>
|
||||||
|
|
||||||
|
@property (nonatomic, weak) GDTNativeExpressAdView *gdtExpressAdView;
|
||||||
|
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isReady;
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isVideoAd;
|
||||||
|
@property (nonatomic, weak) UIViewController *controller;
|
||||||
|
|
||||||
|
- (BOOL)isAdValid;
|
||||||
|
- (UIView *)adView;
|
||||||
|
|
||||||
|
- (void)render;
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
//发送竞胜结果
|
||||||
|
- (void)sendWinNotification:(NSInteger)price;
|
||||||
|
|
||||||
|
//发送竞败结果
|
||||||
|
- (void)sendLossNotification:(NSInteger)price reason:(NSInteger)reason adnId:(NSString *)adnId;
|
||||||
|
|
||||||
|
//设置实际结算价
|
||||||
|
- (void)setBidECPM:(NSInteger)price;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* GDTNativeExpressAdViewAdapterProtocol_h */
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 524c4b6c56c474c5fb91a4260c9f41eb
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,152 @@
|
||||||
|
//
|
||||||
|
// GDTNativeExpressProAdView.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2020/4/28.
|
||||||
|
// Copyright © 2020 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTAdParams.h"
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class GDTNativeExpressProAdView;
|
||||||
|
|
||||||
|
@protocol GDTNativeExpressProAdViewDelegate <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
* 原生模板2.0广告渲染成功, 此时的 nativeExpressAdView.size.height 根据 size.width 完成了动态更新。
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewRenderSuccess:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板2.0广告渲染失败
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewRenderFail:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板2.0广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewExposure:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板2.0广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewClicked:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板2.0广告被关闭
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewClosed:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击原生模板2.0广告以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewWillPresentScreen:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击原生模板2.0广告以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewDidPresentScreen:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewWillDissmissScreen:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页已经关闭
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewDidDissmissScreen:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页 WillPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewWillPresentVideoVC:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页 DidPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewDidPresentVideoVC:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页 WillDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewWillDismissVideoVC:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页 DidDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewDidDismissVideoVC:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详解:当点击应用下载或者广告调用系统程序打开时调用
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdViewApplicationWillEnterBackground:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原生模板视频广告 player 播放状态更新回调
|
||||||
|
*/
|
||||||
|
- (void)gdt_NativeExpressProAdView:(GDTNativeExpressProAdView *)nativeExpressProAdView playerStatusChanged:(GDTMediaPlayerStatus)status;
|
||||||
|
|
||||||
|
- (void)gdt_NativeExpressProAdViewVideoDidFinished:(GDTNativeExpressProAdView *)nativeExpressProAdView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTNativeExpressProAdView : UIView <GDTAdProtocol>
|
||||||
|
|
||||||
|
@property (nonatomic, weak) id <GDTNativeExpressProAdViewDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否渲染完毕
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isReady;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是视频模板广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isVideoAd;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* viewControllerForPresentingModalView
|
||||||
|
* 详解:[必选]开发者需传入用来弹出目标页的ViewController,一般为当前ViewController
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) UIViewController *controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*[必选]
|
||||||
|
*原生模板2.0广告渲染
|
||||||
|
*/
|
||||||
|
- (void)render;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频模板广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频模板广告已播放时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2342e70f08c9f45b88eaeafc72b1fae4
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,199 @@
|
||||||
|
//
|
||||||
|
// GDTRewardVideoAd.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2018/9/1.
|
||||||
|
// Copyright © 2018年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTLoadAdParams.h"
|
||||||
|
#import "GDTServerSideVerificationOptions.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
|
||||||
|
@protocol GDTRewardedVideoAdDelegate;
|
||||||
|
|
||||||
|
@interface GDTRewardVideoAd : NSObject <GDTAdProtocol>
|
||||||
|
/**
|
||||||
|
* 广告是否有效,以下情况会返回NO,建议在展示广告之前判断,否则会影响计费或展示失败
|
||||||
|
* a.广告未拉取成功
|
||||||
|
* b.广告已经曝光过
|
||||||
|
* c.广告过期
|
||||||
|
*/
|
||||||
|
@property (nonatomic, getter=isAdValid, readonly) BOOL adValid;
|
||||||
|
@property (nonatomic) BOOL videoMuted;
|
||||||
|
@property (nonatomic, assign, readonly) NSInteger expiredTimestamp;
|
||||||
|
@property (nonatomic, weak) id <GDTRewardedVideoAdDelegate> delegate;
|
||||||
|
@property (nonatomic, readonly) NSString *placementId;
|
||||||
|
@property (nonatomic, strong) GDTLoadAdParams *loadAdParams;
|
||||||
|
@property (nonatomic, strong) GDTServerSideVerificationOptions *serverSideVerificationOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
构造方法
|
||||||
|
|
||||||
|
@param placementId - 广告位 ID
|
||||||
|
@return GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法, S2S bidding 后获取到 token 再调用此方法
|
||||||
|
* @param placementId 广告位 ID
|
||||||
|
* @param token 通过 Server Bidding 请求回来的 token
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId token:(NSString *)token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
|
||||||
|
* 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
|
||||||
|
*/
|
||||||
|
- (void)setBidECPM:(NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
加载广告方法 支持 iOS8.1 及以上系统
|
||||||
|
*/
|
||||||
|
- (void)loadAd;
|
||||||
|
/**
|
||||||
|
展示广告方法
|
||||||
|
|
||||||
|
@param rootViewController 用于 present 激励视频 VC
|
||||||
|
@return 是否展示成功
|
||||||
|
*/
|
||||||
|
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
*/
|
||||||
|
- (void)sendWinNotificationWithPrice:(NSInteger)price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞败之后调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
* @param reason - 优量汇广告竞败原因
|
||||||
|
* @param adnID - adnID
|
||||||
|
*/
|
||||||
|
- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告平台名称
|
||||||
|
|
||||||
|
@return 当使用激励视频聚合功能时,用于区分广告平台
|
||||||
|
*/
|
||||||
|
- (NSString *)adNetworkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当广告类型为 GDTRewardAdTypeVideo时,返回视频时长,单位 ms,当广告类型为GDTRewardAdTypePage时,返回0
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 激励广告的类型,需在gdt_rewardVideoAdDidLoad回调后调用
|
||||||
|
*/
|
||||||
|
- (GDTRewardAdType)rewardAdType;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@protocol GDTRewardedVideoAdDelegate <GDTAdDelegate>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告数据加载成功回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidLoad:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频数据下载成功回调,已经下载过的视频会直接回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdVideoDidLoad:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频播放页即将展示回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdWillVisible:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告曝光回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidExposed:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频播放页关闭回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidClose:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告信息点击回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidClicked:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告各种错误信息回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
@param error 具体错误信息
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAd:(GDTRewardVideoAd *)rewardedVideoAd didFailWithError:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告播放达到激励条件回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidRewardEffective:(GDTRewardVideoAd *)rewardedVideoAd GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃,请使用 gdt_rewardVideoAdDidRewardEffective:info:");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告播放达到激励条件回调
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
@param info 包含此次广告行为的一些信息,例如 @{@"GDT_TRANS_ID":@"930f1fc8ac59983bbdf4548ee40ac353"}, 通过@“GDT_TRANS_ID”可获取此次广告行为的交易id
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidRewardEffective:(GDTRewardVideoAd *)rewardedVideoAd info:(NSDictionary *)info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告视频播放完成
|
||||||
|
|
||||||
|
@param rewardedVideoAd GDTRewardVideoAd 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_rewardVideoAdDidPlayFinish:(GDTRewardVideoAd *)rewardedVideoAd;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3791027229d344136a1c3d7c4d55eb49
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,38 @@
|
||||||
|
//
|
||||||
|
// GDTRewardVideoAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/6/19.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
#import "GDTServerSideVerificationOptions.h"
|
||||||
|
|
||||||
|
@protocol GDTRewardVideoAdNetworkConnectorProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTRewardVideoAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol>
|
||||||
|
|
||||||
|
- (void)loadAd;
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
@property (nonatomic, strong) GDTServerSideVerificationOptions *serverSideVerificationOptions;
|
||||||
|
|
||||||
|
@property (nonatomic) BOOL videoMuted;
|
||||||
|
|
||||||
|
- (BOOL)showAdFromRootViewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
- (BOOL)isAdValid;
|
||||||
|
|
||||||
|
- (NSInteger)expiredTimestamp;
|
||||||
|
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f9ec5162b48b84a939320c8acf862987
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,72 @@
|
||||||
|
//
|
||||||
|
// GDTRewardVideoAdNetworkConnectorProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/6/19.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTRewardVideoAdNetworkAdapterProtocol;
|
||||||
|
|
||||||
|
|
||||||
|
@protocol GDTRewardVideoAdNetworkConnectorProtocol <GDTBaseAdNetworkConnectorProtocol>
|
||||||
|
|
||||||
|
- (void)adapter_rewardVideoAdDidLoad:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频数据下载成功回调,已经下载过的视频会直接回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAdVideoDidLoad:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频播放页即将展示回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAdWillVisible:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告曝光回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAdDidExposed:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频播放页关闭回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAdDidClose:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告信息点击回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAdDidClicked:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告各种错误信息回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
@param error 具体错误信息
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAd:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter didFailWithError:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告播放达到激励条件回调
|
||||||
|
|
||||||
|
@param adapter 实例
|
||||||
|
*/
|
||||||
|
- (void)adapter_rewardVideoAdDidRewardEffective:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
|
||||||
|
- (void)adapter_rewardVideoAdDidPlayFinish:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cd054ad7466834ce2850990ba9282bc7
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,119 @@
|
||||||
|
//
|
||||||
|
// GDTSDKConfig.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by GaoChao on 14/8/25.
|
||||||
|
// Copyright (c) 2014年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTAdTestSetting.h"
|
||||||
|
|
||||||
|
@interface GDTSDKConfig : NSObject
|
||||||
|
|
||||||
|
/**
|
||||||
|
SDK 注册接口,请在 app 初始化时调用。
|
||||||
|
@param appId - 媒体ID
|
||||||
|
|
||||||
|
@return 注册是否成功。
|
||||||
|
*/
|
||||||
|
+ (BOOL)registerAppId:(NSString *)appId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供给聚合平台用来设定SDK 流量分类
|
||||||
|
*/
|
||||||
|
+ (void)setSdkSrc:(NSString *)sdkSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看SDK流量来源
|
||||||
|
*/
|
||||||
|
+ (NSString *)sdkSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 SDK 版本
|
||||||
|
*/
|
||||||
|
|
||||||
|
+ (NSString *)sdkVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置流量渠道号
|
||||||
|
渠道号信息主要用来协助平台提升流量变现效果及您的收益,请如实填写,若渠道号无法满足您的诉求请联系平台负责商务
|
||||||
|
|
||||||
|
渠道号映射关系为:
|
||||||
|
1:百度
|
||||||
|
2:头条
|
||||||
|
3:广点通
|
||||||
|
4:搜狗
|
||||||
|
5:其他网盟
|
||||||
|
6:oppo
|
||||||
|
7:vivo
|
||||||
|
8:华为
|
||||||
|
9:应用宝
|
||||||
|
10:小米
|
||||||
|
11:金立
|
||||||
|
12:百度手机助手
|
||||||
|
13:魅族
|
||||||
|
14:AppStore
|
||||||
|
999:其他
|
||||||
|
*/
|
||||||
|
+ (void)setChannel:(NSInteger)channel;
|
||||||
|
|
||||||
|
+ (void)setSDKType:(NSInteger)type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
在播放音频时是否使用SDK内部对AVAudioSession设置的category及options,默认使用,若不使用,SDK内部不做任何处理,由调用方在展示广告时自行设置;
|
||||||
|
SDK设置的category为AVAudioSessionCategoryAmbient,options为AVAudioSessionCategoryOptionDuckOthers
|
||||||
|
*/
|
||||||
|
+ (void)enableDefaultAudioSessionSetting:(BOOL)enabled;
|
||||||
|
|
||||||
|
+ (GDTAdTestSetting *)debugSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
设置开发阶段调试相关的配置
|
||||||
|
*/
|
||||||
|
+ (void)setDebugSetting:(GDTAdTestSetting *)debugSetting;
|
||||||
|
|
||||||
|
+ (void)forbiddenIDFA:(BOOL)forbiddened;
|
||||||
|
|
||||||
|
/**
|
||||||
|
获取 buyerId 用于 Server Bidding 请求获取 token, 建议每次请求前调用一次, 并使用最新值请求
|
||||||
|
*/
|
||||||
|
+ (NSString *)getBuyerIdWithContext:(NSDictionary *)info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
获取用于 Server Bidding 请求SDK侧相关请求参数信息
|
||||||
|
*/
|
||||||
|
+ (NSString *)getSDKInfoWithPlacementId:(NSString *)placementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
设置个性化推荐状态
|
||||||
|
@param state 1为关闭个性化推荐,其他值或未设置为打开
|
||||||
|
*/
|
||||||
|
+ (void)setPersonalizedState:(NSInteger)state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
设置用户信息
|
||||||
|
@param extraUserDictionary, 必须为有效的字符串格式的键值对
|
||||||
|
|
||||||
|
已支持的key有:
|
||||||
|
@"lng",实时的地理位置经度,值为字符串格式的经度值,比如@“116.67765”
|
||||||
|
@"lat", 实时的地理位置纬度,值为字符串格式的纬度值,比如@"39.365678"
|
||||||
|
@"loc_time",实时的地理位置获取时间,值为字符串格式的unix时间戳,单位秒,比如@"1639450944"
|
||||||
|
@"shakable",是否关闭摇一摇,值为字符串格式,”0“:关闭摇一摇;”1“:开启摇一摇
|
||||||
|
*/
|
||||||
|
+ (void)setExtraUserData:(NSDictionary <NSString *, NSString *> *)extraUserDictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
设置用户信息
|
||||||
|
@param mediaExtDictionary, 必须为有效的字符串格式的键值对
|
||||||
|
|
||||||
|
已支持的key有:
|
||||||
|
@"user_id",用户的id,比如QQ号
|
||||||
|
|
||||||
|
@param overrideOld, 新的mediaExtDictionary是否覆盖之前设置的mediaExtDictionary
|
||||||
|
*/
|
||||||
|
+ (void)setMediaExtData:(NSDictionary <NSString *, NSString *> *)mediaExtDictionary overrideOldData:(BOOL)overrideOld;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8bcafec089db84f4d83a196515a5d6bc
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,93 @@
|
||||||
|
//
|
||||||
|
// GDTSDKDefines.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2017/11/6.
|
||||||
|
// Copyright © 2017年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
#if defined(__has_attribute)
|
||||||
|
#if __has_attribute(deprecated)
|
||||||
|
#define GDT_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
|
||||||
|
#define GDT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
||||||
|
#else
|
||||||
|
#define GDT_DEPRECATED_MSG_ATTRIBUTE(s)
|
||||||
|
#define GDT_DEPRECATED_ATTRIBUTE
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define GDT_DEPRECATED_MSG_ATTRIBUTE(s)
|
||||||
|
#define GDT_DEPRECATED_ATTRIBUTE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define GDTScreenHeight ([UIScreen mainScreen].bounds.size.height)
|
||||||
|
#define GDTScreenWidth ([UIScreen mainScreen].bounds.size.width)
|
||||||
|
|
||||||
|
#define GDTPerformSelector(target,selector,type,defualtValue) \
|
||||||
|
({\
|
||||||
|
type result = defualtValue;\
|
||||||
|
if ([target respondsToSelector:selector]) {\
|
||||||
|
result = (type)[target performSelector:selector];\
|
||||||
|
}\
|
||||||
|
(result);\
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* 视频播放器状态
|
||||||
|
*
|
||||||
|
* 播放器只可能处于以下状态中的一种
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSUInteger, GDTMediaPlayerStatus) {
|
||||||
|
GDTMediaPlayerStatusInitial = 0, // 初始状态
|
||||||
|
GDTMediaPlayerStatusLoading = 1, // 加载中
|
||||||
|
GDTMediaPlayerStatusStarted = 2, // 开始播放
|
||||||
|
GDTMediaPlayerStatusPaused = 3, // 用户行为导致暂停
|
||||||
|
GDTMediaPlayerStatusError = 4, // 播放出错
|
||||||
|
GDTMediaPlayerStatusStoped = 5, // 播放停止
|
||||||
|
|
||||||
|
GDTMediaPlayerStatusWillStart = 10, // 即将播放
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef enum GDTSDKLoginType {
|
||||||
|
GDTSDKLoginTypeUnknow = 0,
|
||||||
|
GDTSDKLoginTypeWeiXin = 1, //微信账号
|
||||||
|
GDTSDKLoginTypeQQ = 2, //QQ账号
|
||||||
|
} GDTSDKLoginType;
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSUInteger, GDTVideoPlayPolicy) {
|
||||||
|
GDTVideoPlayPolicyUnknow = 0, // 默认值,未设置
|
||||||
|
GDTVideoPlayPolicyAuto = 1, // 用户角度看起来是自动播放
|
||||||
|
GDTVideoPlayPolicyManual = 2 // 用户角度看起来是手动播放或点击后播放
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSUInteger, GDTVideoRenderType) {
|
||||||
|
GDTVideoRenderTypeUnknow = 0,
|
||||||
|
GDTVideoRenderTypeSDK = 1,
|
||||||
|
GDTVideoRenderTypeDeveloper = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef NS_ENUM (NSUInteger, GDTRewardAdType) {
|
||||||
|
GDTRewardAdTypeVideo = 0,//激励视频
|
||||||
|
GDTRewardAdTypePage = 1 //激励浏览
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline BOOL isIPhoneXSeries() {
|
||||||
|
if (@available(iOS 11.0, *)) {
|
||||||
|
UIWindow *mainWindow = [[[UIApplication sharedApplication] delegate] window];
|
||||||
|
if (mainWindow.safeAreaInsets.bottom > 0.0) {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, GDTAdBiddingLossReason) {
|
||||||
|
GDTAdBiddingLossReasonLowPrice = 1, // 竞争力不足
|
||||||
|
GDTAdBiddingLossReasonLoadTimeout = 2, // 返回超时
|
||||||
|
GDTAdBiddingLossReasonNoAd = 3, // 无广告回包
|
||||||
|
GDTAdBiddingLossReasonAdDataError = 4, // 回包不合法
|
||||||
|
GDTAdBiddingLossReasonOther = 10001 // 其他
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 24a5cd4a48c4844ae86b40dbbd83fc7d
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,23 @@
|
||||||
|
//
|
||||||
|
// GDTServerSideVerificationOptions.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by Nancy on 2020/12/18.
|
||||||
|
// Copyright © 2020 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface GDTServerSideVerificationOptions : NSObject
|
||||||
|
|
||||||
|
//用户的userid,可选
|
||||||
|
@property(nonatomic, copy, nullable) NSString *userIdentifier;
|
||||||
|
|
||||||
|
//服务器端验证回调中包含的可选自定义奖励字符串
|
||||||
|
@property(nonatomic, copy, nullable) NSString *customRewardString;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f3999dd3ba070419dbecc472a9b8773e
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,264 @@
|
||||||
|
//
|
||||||
|
// GDTSplashAd.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// 广点通开屏广告,目前只支持iPhone设备上展示垂直方向的开屏广告
|
||||||
|
// Created by GaoChao on 15/8/20.
|
||||||
|
// Copyright © 2015年 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTSplashZoomOutView.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
@class GDTSplashAd;
|
||||||
|
|
||||||
|
@protocol GDTSplashAdDelegate <GDTAdDelegate>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
* 开屏广告成功展示
|
||||||
|
*/
|
||||||
|
- (void)splashAdSuccessPresentScreen:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告素材加载成功
|
||||||
|
*/
|
||||||
|
- (void)splashAdDidLoad:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告展示失败
|
||||||
|
*/
|
||||||
|
- (void)splashAdFailToPresent:(GDTSplashAd *)splashAd withError:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用进入后台时回调
|
||||||
|
* 详解: 当点击下载应用时会调用系统程序打开,应用切换到后台
|
||||||
|
*/
|
||||||
|
- (void)splashAdApplicationWillEnterBackground:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)splashAdExposured:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)splashAdClicked:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告将要关闭回调
|
||||||
|
*/
|
||||||
|
- (void)splashAdWillClosed:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告关闭回调
|
||||||
|
*/
|
||||||
|
- (void)splashAdClosed:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告点击以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)splashAdWillPresentFullScreenModal:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告点击以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)splashAdDidPresentFullScreenModal:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击以后全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)splashAdWillDismissFullScreenModal:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击以后全屏广告页已经关闭
|
||||||
|
*/
|
||||||
|
- (void)splashAdDidDismissFullScreenModal:(GDTSplashAd *)splashAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告剩余时间回调
|
||||||
|
*/
|
||||||
|
- (void)splashAdLifeTime:(NSUInteger)time;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTSplashAd : NSObject <GDTAdProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 委托对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id<GDTSplashAdDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取广告超时时间,默认为5秒
|
||||||
|
* 详解:拉取广告超时时间,开发者调用loadAd方法以后会立即展示backgroundImage,然后在该超时时间内,如果广告拉
|
||||||
|
* 取成功,则立马展示开屏广告,否则放弃此次广告展示机会。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) CGFloat fetchDelay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告的背景图片
|
||||||
|
* 可以设置背景图片作为开屏加载时的默认背景
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong) UIImage *backgroundImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告的背景色
|
||||||
|
* 可以设置开屏图片来作为开屏加载时的默认图片
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) UIColor *backgroundColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳过按钮的位置
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) CGPoint skipButtonCenter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要开屏视频V+功能
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL needZoomOut;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当广告命中开屏视频V+时,splshZoomOutView有值
|
||||||
|
* splashZoomOutView推荐尺寸为9:16,最小尺寸推荐为126*224
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, readonly) GDTSplashZoomOutView *splashZoomOutView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告平台名称
|
||||||
|
|
||||||
|
@return 当使用流量分配功能时,用于区分广告平台;未使用时为空字符串
|
||||||
|
*/
|
||||||
|
- (NSString *)adNetworkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法
|
||||||
|
* 详解:placementId - 广告位 ID
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法, S2S bidding 后获取到 token 再调用此方法
|
||||||
|
* @param placementId 广告位 ID
|
||||||
|
* @param token 通过 Server Bidding 请求回来的 token
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId token:(NSString *)token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
|
||||||
|
* 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
|
||||||
|
*/
|
||||||
|
- (void)setBidECPM:(NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
预加载闪屏广告接口
|
||||||
|
|
||||||
|
@param placementId 广告位ID
|
||||||
|
*/
|
||||||
|
- (void)preloadSplashOrderWithPlacementId:(NSString *)placementId;
|
||||||
|
|
||||||
|
#pragma mark - Parallel method
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回广告是否可展示
|
||||||
|
* 对于并行请求,在调用showAdInWindow前时需判断下
|
||||||
|
* @return 当广告已经加载完成&&未曝光&&未过期时,为YES,否则为NO
|
||||||
|
*/
|
||||||
|
- (BOOL)isAdValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起拉取广告请求,只拉取不展示
|
||||||
|
* 详解:广告素材及广告图片拉取成功后会回调splashAdDidLoad方法,当拉取失败时会回调splashAdFailToPresent方法
|
||||||
|
*/
|
||||||
|
- (void)loadAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示广告,调用此方法前需调用isAdValid方法判断广告素材是否有效
|
||||||
|
* 详解:广告展示成功时会回调splashAdSuccessPresentScreen方法,展示失败时会回调splashAdFailToPresent方法
|
||||||
|
*/
|
||||||
|
- (void)showAdInWindow:(UIWindow *)window withBottomView:(UIView *)bottomView skipView:(UIView *)skipView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起拉取全屏广告请求,只拉取不展示
|
||||||
|
* 详解:广告素材及广告图片拉取成功后会回调splashAdDidLoad方法,当拉取失败时会回调splashAdFailToPresent方法
|
||||||
|
*/
|
||||||
|
- (void)loadFullScreenAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示全屏广告,调用此方法前需调用isAdValid方法判断广告素材是否有效
|
||||||
|
* 详解:广告展示成功时会回调splashAdSuccessPresentScreen方法,展示失败时会回调splashAdFailToPresent方法
|
||||||
|
*/
|
||||||
|
- (void)showFullScreenAdInWindow:(UIWindow *)window withLogoImage:(UIImage *)logoImage skipView:(UIView *)skipView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
*/
|
||||||
|
- (void)sendWinNotificationWithPrice:(NSInteger)price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞败之后调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
* @param reason - 优量汇广告竞败原因
|
||||||
|
* @param adnID - adnID
|
||||||
|
*/
|
||||||
|
- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告发起请求并展示在Window中
|
||||||
|
* 详解:[可选]发起拉取广告请求,并将获取的广告以全屏形式展示在传入的Window参数中
|
||||||
|
* 提示: Splash广告只支持竖屏
|
||||||
|
* @param window 展示全屏开屏的容器
|
||||||
|
*/
|
||||||
|
- (void)loadAdAndShowInWindow:(UIWindow *)window GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃,请分别使用loadAd 和 showAdInWindow:接口");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告发起请求并展示在Window中, 同时在屏幕底部设置应用自身的Logo页面或是自定义View
|
||||||
|
* 详解:[可选]发起拉取广告请求,并将获取的广告以半屏形式展示在传入的Window的上半部,剩余部分展示传入的bottomView
|
||||||
|
* 请注意1.bottomView需设置好宽高,所占的空间不能过大,并保证高度不超过屏幕高度的 25%。2.Splash广告只支持竖屏
|
||||||
|
* @param window 展示开屏的容器
|
||||||
|
* bottomView 自定义底部View,可以在此View中设置应用Logo
|
||||||
|
*/
|
||||||
|
- (void)loadAdAndShowInWindow:(UIWindow *)window withBottomView:(UIView *)bottomView GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃,请分别使用loadAd 和 showAdInWindow:接口");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告发起请求并展示在Window中, 同时在屏幕底部设置应用自身的Logo页面或是自定义View,skipView是自定义的“跳过”样式
|
||||||
|
* 详解:[可选]发起拉取广告请求,并将获取的广告以半屏形式展示在传入的Window的上半部,剩余部分展示传入的bottomView
|
||||||
|
* 请注意1.bottomView需设置好宽高,所占的空间不能过大,并保证高度不超过屏幕高度的 25%。2.Splash广告只支持竖屏
|
||||||
|
* skipView
|
||||||
|
* @param window 展示开屏的容器
|
||||||
|
* bottomView 自定义底部View,可以在此View中设置应用Logo
|
||||||
|
skipView 自定义”跳过“View.
|
||||||
|
*/
|
||||||
|
- (void)loadAdAndShowInWindow:(UIWindow *)window withBottomView:(UIView *)bottomView skipView:(UIView *)skipView GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃,请分别使用loadAd 和 showAdInWindow:接口");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告发起请求并展示在Window中, 同时在屏幕底部设置应用自身的Logo页面或是自定义View,skipView是自定义的“跳过”样式
|
||||||
|
* 详解:[可选]发起拉取广告请求,并将获取的广告全屏展示, 可自定义 logo
|
||||||
|
* skipView
|
||||||
|
* @param window 展示开屏的容器
|
||||||
|
* logoImage 自定义logo 展示在屏幕左下角
|
||||||
|
skipView 自定义”跳过“View.
|
||||||
|
*/
|
||||||
|
- (void)loadAdAndShowFullScreenInWindow:(UIWindow *)window withLogoImage:(UIImage *)logoImage skipView:(UIView *)skipView GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃,请分别使用loadFullScreenAd 和 showFullScreenAdInWindow:接口");
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c5d9b984289d34b358da91811bb24e49
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,38 @@
|
||||||
|
//
|
||||||
|
// GDTSplashAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/7/27.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
#import "GDTSplashZoomOutView.h"
|
||||||
|
|
||||||
|
@protocol GDTSplashAdNetworkConnectorProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTSplashAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol>
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger fetchDelay;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIImage *backgroundImage;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) UIColor *backgroundColor;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) CGPoint skipButtonCenter;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) BOOL needZoomOut;
|
||||||
|
|
||||||
|
@property (nonatomic, strong, readonly, nullable) GDTSplashZoomOutView *splashZoomOutView;
|
||||||
|
@property (nonatomic, assign) BOOL shouldLoadFullscreenAd;
|
||||||
|
|
||||||
|
- (BOOL)isAdValid;
|
||||||
|
- (void)loadAd;
|
||||||
|
- (void)showAdInWindow:(UIWindow *)window withBottomView:(UIView *_Nullable)bottomView skipView:(UIView *)skipView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 15e53f598267c46f4ac772dd56298c96
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,88 @@
|
||||||
|
//
|
||||||
|
// GDTSplashAdNetworkConnectorProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/7/27.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTSplashAdNetworkAdapterProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTSplashAdNetworkConnectorProtocol <GDTBaseAdNetworkConnectorProtocol>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
* 开屏广告成功展示
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdSuccessPresentScreen:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告素材加载成功
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdDidLoad:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告展示失败
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdFailToPresent:(id <GDTSplashAdNetworkAdapterProtocol>)adapter withError:(NSError * _Nullable)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用进入后台时回调
|
||||||
|
* 详解: 当点击下载应用时会调用系统程序打开,应用切换到后台
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdApplicationWillEnterBackground:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdExposured:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdClicked:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告将要关闭回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdWillClosed:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告关闭回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdClosed:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告点击以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdWillPresentFullScreenModal:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告点击以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdDidPresentFullScreenModal:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击以后全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdWillDismissFullScreenModal:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击以后全屏广告页已经关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAdDidDismissFullScreenModal:(id <GDTSplashAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开屏广告剩余时间回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_splashAd:(id <GDTSplashAdNetworkAdapterProtocol>)adapter lifeTime:(NSUInteger)time;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 472cfe7061f44460497a8086bdbdd34c
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,28 @@
|
||||||
|
//
|
||||||
|
// GDTSplashZoomOutView.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2020/11/11.
|
||||||
|
// Copyright © 2020 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class GDTSplashZoomOutView;
|
||||||
|
|
||||||
|
@protocol GDTSplashZoomOutViewDelegate <NSObject>
|
||||||
|
@optional
|
||||||
|
- (void)splashZoomOutViewDidClick:(GDTSplashZoomOutView *)splashZoomOutView;
|
||||||
|
- (void)splashZoomOutViewAdDidClose:(GDTSplashZoomOutView *)splashZoomOutView;
|
||||||
|
- (void)splashZoomOutViewAdVideoFinished:(GDTSplashZoomOutView *)splashZoomOutView;
|
||||||
|
- (void)splashZoomOutViewAdDidPresentFullScreenModal:(GDTSplashZoomOutView *)splashZoomOutView;
|
||||||
|
- (void)splashZoomOutViewAdDidDismissFullScreenModal:(GDTSplashZoomOutView *)splashZoomOutView;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTSplashZoomOutView : UIView
|
||||||
|
@property (nonatomic, weak) UIViewController *rootViewController;
|
||||||
|
@property (nonatomic, weak) id<GDTSplashZoomOutViewDelegate> delegate;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b459b1ecf4a674fb0b3335bf51d3984a
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,24 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedBannerAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by rowanzhang on 2021/7/22.
|
||||||
|
// Copyright © 2021 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GDTUnifiedBannerAdNetworkAdapterProtocol_h
|
||||||
|
#define GDTUnifiedBannerAdNetworkAdapterProtocol_h
|
||||||
|
|
||||||
|
#import "GDTUnifiedBannerView.h"
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTUnifiedBannerAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol>
|
||||||
|
|
||||||
|
- (void)loadAdOnBannerView:(GDTUnifiedBannerView *)banner
|
||||||
|
currentViewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
- (void)showBannerAd;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* GDTUnifiedBannerAdNetworkAdapterProtocol_h */
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8d262b9758d974a4da52536bcc741f0a
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,40 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedBannerAdNetworkConnectorProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by rowanzhang on 2021/7/22.
|
||||||
|
// Copyright © 2021 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GDTUnifiedBannerAdNetworkConnectorProtocol_h
|
||||||
|
#define GDTUnifiedBannerAdNetworkConnectorProtocol_h
|
||||||
|
|
||||||
|
@protocol GDTUnifiedBannerAdNetworkAdapterProtocol;
|
||||||
|
|
||||||
|
@protocol GDTUnifiedBannerAdNetworkConnectorProtocol <GDTBaseAdNetworkConnectorProtocol>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewDidLoad:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewFailedToLoad:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter error:(NSError *)error;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewWillExpose:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewClicked:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewWillPresentFullScreenModal:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewDidPresentFullScreenModal:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewWillDismissFullScreenModal:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewDidDismissFullScreenModal:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewWillLeaveApplication:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedBannerViewWillClose:(id <GDTUnifiedBannerAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* GDTUnifiedBannerAdNetworkConnectorProtocol_h */
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e6621372057d44e66bbfce76df443ec2
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,179 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedBannerView.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2019/3/1.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTLoadAdParams.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class GDTUnifiedBannerView;
|
||||||
|
|
||||||
|
@protocol GDTUnifiedBannerViewDelegate <GDTAdDelegate>
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
* 请求广告条数据成功后调用
|
||||||
|
* 当接收服务器返回的广告数据成功后调用该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewDidLoad:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求广告条数据失败后调用
|
||||||
|
* 当接收服务器返回的广告数据失败后调用该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewFailedToLoad:(GDTUnifiedBannerView *)unifiedBannerView error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner2.0曝光回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewWillExpose:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner2.0点击回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewClicked:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner2.0广告点击以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewWillPresentFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner2.0广告点击以后弹出全屏广告页完毕
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewDidPresentFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页即将被关闭
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewWillDismissFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页已经被关闭
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewDidDismissFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当点击应用下载或者广告调用系统程序打开
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewWillLeaveApplication:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner2.0被用户关闭时调用
|
||||||
|
* 会立即关闭当前banner广告,若启用轮播,(刷新间隔 - 当前广告已展示时间)后会展示新的广告
|
||||||
|
* 若未启用轮播或不需要再展示,需在回调中将unifiedBannerView从父view移除置nil
|
||||||
|
*/
|
||||||
|
- (void)unifiedBannerViewWillClose:(GDTUnifiedBannerView *)unifiedBannerView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTUnifiedBannerView : UIView <GDTAdProtocol>
|
||||||
|
/**
|
||||||
|
* 委托 [可选]
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id<GDTUnifiedBannerViewDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Banner展现和轮播时的动画效果开关,默认打开
|
||||||
|
*/
|
||||||
|
@property (nonatomic) BOOL animated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告刷新间隔,范围 [30, 120] 秒,默认值 30 秒。设 0 则不刷新。 [可选]
|
||||||
|
*/
|
||||||
|
@property (nonatomic) int autoSwitchInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QQ小游戏SDK字段透传
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, nullable) GDTLoadAdParams *loadAdParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告是否有效,以下情况会返回NO,建议在展示广告之前判断,否则会影响计费或展示失败
|
||||||
|
* a.广告未拉取成功
|
||||||
|
* b.广告过期
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isAdValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法
|
||||||
|
* 详解:placementId - 广告位 ID
|
||||||
|
* viewController - 视图控制器
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId
|
||||||
|
viewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法
|
||||||
|
* 详解:frame - banner 展示的位置和大小
|
||||||
|
* placementId - 广告位 ID
|
||||||
|
* viewController - 视图控制器
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
|
placementId:(NSString *)placementId
|
||||||
|
viewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法, S2S bidding 后获取到 token 再调用此方法
|
||||||
|
* @param placementId 广告位 ID
|
||||||
|
* @param token 通过 Server Bidding 请求回来的 token
|
||||||
|
* @param viewController 视图控制器
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId
|
||||||
|
token:(NSString *)token
|
||||||
|
viewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
|
||||||
|
* 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
|
||||||
|
*/
|
||||||
|
- (void)setBidECPM:(NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取并展示广告
|
||||||
|
*/
|
||||||
|
- (void)loadAdAndShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告平台名称
|
||||||
|
|
||||||
|
@return 当使用激励视频聚合功能时,用于区分广告平台
|
||||||
|
*/
|
||||||
|
- (NSString *)adNetworkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
*/
|
||||||
|
- (void)sendWinNotificationWithPrice:(NSInteger)price;
|
||||||
|
/**
|
||||||
|
* 竞败之后调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
* @param reason - 优量汇广告竞败原因
|
||||||
|
* @param adnID - adnID
|
||||||
|
*/
|
||||||
|
- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 118422fbddb2840debaa4f67903c1ea8
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,288 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedInterstitialAd.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2019/3/4.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTServerSideVerificationOptions.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class GDTUnifiedInterstitialAd;
|
||||||
|
|
||||||
|
@protocol GDTUnifiedInterstitialAdDelegate <GDTAdDelegate>
|
||||||
|
@optional
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告预加载成功回调
|
||||||
|
* 当接收服务器返回的广告数据成功且预加载后调用该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialSuccessToLoadAd:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告预加载失败回调
|
||||||
|
* 当接收服务器返回的广告数据失败后调用该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialFailToLoadAd:(GDTUnifiedInterstitialAd *)unifiedInterstitial error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告视频缓存完成
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialDidDownloadVideo:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告渲染成功
|
||||||
|
* 建议在此回调后展示广告
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialRenderSuccess:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告渲染失败
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialRenderFail:(GDTUnifiedInterstitialAd *)unifiedInterstitial error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告将要展示回调
|
||||||
|
* 插屏2.0广告即将展示回调该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialWillPresentScreen:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告视图展示成功回调
|
||||||
|
* 插屏2.0广告展示成功回调该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialDidPresentScreen:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告视图展示失败回调
|
||||||
|
* 插屏2.0广告展示失败回调该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialFailToPresent:(GDTUnifiedInterstitialAd *)unifiedInterstitial error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告展示结束回调
|
||||||
|
* 插屏2.0广告展示结束回调该函数
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialDidDismissScreen:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当点击下载应用时会调用系统程序打开其它App或者Appstore时回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialWillLeaveApplication:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialWillExposure:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialClicked:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击插屏2.0广告以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdWillPresentFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击插屏2.0广告以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdDidPresentFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdWillDismissFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页被关闭
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdDidDismissFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告 player 播放状态更新回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAd:(GDTUnifiedInterstitialAd *)unifiedInterstitial playerStatusChanged:(GDTMediaPlayerStatus)status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 WillPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdViewWillPresentVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 DidPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdViewDidPresentVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 WillDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdViewWillDismissVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 DidDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdViewDidDismissVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏激励广告视频播放达到激励条件回调(只有插屏激励广告位才会有此回调)
|
||||||
|
|
||||||
|
@param unifiedInterstitial GDTUnifiedInterstitialAd 实例
|
||||||
|
@param info 包含此次广告行为的一些信息,例如 @{@"GDT_TRANS_ID":@"930f1fc8ac59983bbdf4548ee40ac353"}, 通过@“GDT_TRANS_ID”可获取此次广告行为的交易id
|
||||||
|
*/
|
||||||
|
- (void)unifiedInterstitialAdDidRewardEffective:(GDTUnifiedInterstitialAd *)unifiedInterstitial info:(NSDictionary *)info;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTUnifiedInterstitialAd : NSObject <GDTAdProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告是否有效,以下情况会返回NO,建议在展示广告之前判断,否则会影响计费或展示失败
|
||||||
|
* a.广告未拉取成功
|
||||||
|
* b.广告已经曝光过
|
||||||
|
* c.广告过期
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isAdValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 委托对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id<GDTUnifiedInterstitialAdDelegate> delegate;
|
||||||
|
|
||||||
|
@property (nonatomic, readonly) NSString *placementId;
|
||||||
|
@property (nonatomic, strong) GDTServerSideVerificationOptions *serverSideVerificationOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法
|
||||||
|
* 详解:placementId - 广告位 ID
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法, S2S bidding 后获取到 token 再调用此方法
|
||||||
|
* @param placementId 广告位 ID
|
||||||
|
* @param token 通过 Server Bidding 请求回来的 token
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId token:(NSString *)token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
|
||||||
|
* 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
|
||||||
|
*/
|
||||||
|
- (void)setBidECPM:(NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告发起请求方法
|
||||||
|
* 详解:[必选]发起拉取广告请求
|
||||||
|
*/
|
||||||
|
- (void)loadAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏全屏视频广告发起请求方法
|
||||||
|
* 详解:[必选]发起拉取广告请求
|
||||||
|
*/
|
||||||
|
- (void)loadFullScreenAd;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告展示方法
|
||||||
|
* 详解:[必选]发起展示广告请求, 必须传入用于显示插播广告的UIViewController
|
||||||
|
*/
|
||||||
|
|
||||||
|
- (void)presentAdFromRootViewController:(UIViewController *)rootViewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏视频全屏广告展示方法
|
||||||
|
* 详解:[必选]发起展示广告请求, 必须传入用于显示插播广告的UIViewController
|
||||||
|
*/
|
||||||
|
- (void)presentFullScreenAdFromRootViewController:(UIViewController *)rootViewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
*/
|
||||||
|
- (void)sendWinNotificationWithPrice:(NSInteger)price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞败之后调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
* @param reason - 优量汇广告竞败原因
|
||||||
|
* @param adnID - adnID
|
||||||
|
*/
|
||||||
|
- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
- (NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
- (NSString *)eCPMLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 非 WiFi 网络,是否自动播放。默认 YES。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
|
||||||
|
@property (nonatomic, assign) BOOL videoAutoPlayOnWWAN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动播放时,是否静音。默认 YES。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频详情页播放时是否静音。默认NO。loadAd 前设置。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL detailPageVideoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长下限,插屏激励广告位设置此属性不生效
|
||||||
|
以下两种情况会使用 0,1:不设置 2:minVideoDuration大于maxVideoDuration
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger minVideoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长上限,视频时长有效值范围为[5,180],插屏激励广告位设置此属性不生效
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger maxVideoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是视频插屏2.0广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频插屏2.0广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频插屏广告已播放时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告平台名称
|
||||||
|
|
||||||
|
@return 当使用流量分配功能时,用于区分广告平台;未使用时为空字符串
|
||||||
|
*/
|
||||||
|
- (NSString *)adNetworkName;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1078c82f8f8c442bdad140fc907e7b62
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,38 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedinterstitialAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/8/10.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTRewardVideoAdNetworkConnectorProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTUnifiedinterstitialAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol>
|
||||||
|
|
||||||
|
- (BOOL)isAdValid;
|
||||||
|
- (void)loadAd;
|
||||||
|
- (void)presentAdFromRootViewController:(UIViewController *)rootViewController;
|
||||||
|
|
||||||
|
@optional
|
||||||
|
@property (nonatomic, assign) BOOL videoAutoPlayOnWWAN;
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted;
|
||||||
|
@property (nonatomic, assign) BOOL detailPageVideoMuted;
|
||||||
|
@property (nonatomic) NSInteger minVideoDuration;
|
||||||
|
@property (nonatomic) NSInteger maxVideoDuration;
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isVideoAd;
|
||||||
|
@property (nonatomic, assign) BOOL shouldLoadFullscreenAd;
|
||||||
|
@property (nonatomic, assign) BOOL shouldShowFullscreenAd;
|
||||||
|
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 30d1db890f9084b8fb5846a32c0b65ee
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,123 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedInterstitialAdNetworkConnectorProtocol.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/8/10.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTUnifiedinterstitialAdNetworkAdapterProtocol;
|
||||||
|
|
||||||
|
|
||||||
|
@protocol GDTUnifiedInterstitialAdNetworkConnectorProtocol <GDTBaseAdNetworkConnectorProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告预加载成功回调
|
||||||
|
* 当接收服务器返回的广告数据成功且预加载后调用该函数
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialSuccessToLoadAd:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告预加载失败回调
|
||||||
|
* 当接收服务器返回的广告数据失败后调用该函数
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialFailToLoadAd:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告将要展示回调
|
||||||
|
* 插屏2.0广告即将展示回调该函数
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialWillPresentScreen:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告视图展示成功回调
|
||||||
|
* 插屏2.0广告展示成功回调该函数
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialDidPresentScreen:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
插屏2.0广告展示视图失败
|
||||||
|
|
||||||
|
@param adapter adapter对象
|
||||||
|
@param error 错误
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialFailToPresentAd:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter error:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告展示结束回调
|
||||||
|
* 插屏2.0广告展示结束回调该函数
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialDidDismissScreen:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当点击下载应用时会调用系统程序打开其它App或者Appstore时回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialWillLeaveApplication:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告曝光回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialWillExposure:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0广告点击回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialClicked:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击插屏2.0广告以后即将弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdWillPresentFullScreenModal:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击插屏2.0广告以后弹出全屏广告页
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdDidPresentFullScreenModal:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页将要关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdWillDismissFullScreenModal:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全屏广告页被关闭
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdDidDismissFullScreenModal:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告 player 播放状态更新回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAd:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter playerStatusChanged:(GDTMediaPlayerStatus)status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 WillPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdViewWillPresentVideoVC:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 DidPresent 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdViewDidPresentVideoVC:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 WillDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdViewWillDismissVideoVC:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏2.0视频广告详情页 DidDismiss 回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdViewDidDismissVideoVC:(id<GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插屏激励回调
|
||||||
|
*/
|
||||||
|
- (void)adapter_unifiedInterstitialAdDidRewardEffective:(id <GDTUnifiedinterstitialAdNetworkAdapterProtocol>)adapter info:(NSDictionary *)info;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cad6994750cc14f6eafa0f425356f7de
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,123 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedNativeAd.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2018/10/10.
|
||||||
|
// Copyright © 2018 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTUnifiedNativeAdDataObject.h"
|
||||||
|
#import "GDTUnifiedNativeAdView.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告数据回调
|
||||||
|
|
||||||
|
@param unifiedNativeAdDataObjects 广告数据数组
|
||||||
|
@param error 错误信息
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdLoaded:(NSArray<GDTUnifiedNativeAdDataObject *> * _Nullable)unifiedNativeAdDataObjects error:(NSError * _Nullable)error;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTUnifiedNativeAd : NSObject
|
||||||
|
@property (nonatomic, weak) id<GDTUnifiedNativeAdDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长下限。
|
||||||
|
以下两种情况会使用 0,1:不设置 2:minVideoDuration大于maxVideoDuration
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger minVideoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
请求视频的时长上限,视频时长有效值范围为[5,180]。
|
||||||
|
*/
|
||||||
|
@property (nonatomic) NSInteger maxVideoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
可选属性,设置本次拉取的视频广告从用户角度看到的视频播放策略。
|
||||||
|
|
||||||
|
“用户角度”特指用户看到的情况,并非SDK是否自动播放,与自动播放策略 GDTVideoAutoPlayPolicy 的取值并非一一对应
|
||||||
|
|
||||||
|
例如开发者设置了 GDTVideoAutoPlayPolicyNever 表示 SDK 不自动播放视频,但是开发者通过 GDTMediaView 的 play 方法播放视频,这在用户看来仍然是自动播放的。
|
||||||
|
|
||||||
|
准确的设置 GDTVideoPlayPolicy 有助于提高视频广告的eCPM值,如果广告位仅支持图文广告,则无需调用。
|
||||||
|
|
||||||
|
需要在 loadAd 前设置此属性。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) GDTVideoPlayPolicy videoPlayPolicy GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃");
|
||||||
|
|
||||||
|
/**
|
||||||
|
可选属性,设置本次拉取的视频广告封面是由SDK渲染还是开发者自行渲染。
|
||||||
|
|
||||||
|
SDK 渲染,指视频广告 containerView 直接在 feed 流等场景展示,用户可以直接看到渲染的视频广告。Demo 工程中的 “视频Feed” 就是 SDK 渲染。
|
||||||
|
|
||||||
|
开发者自行渲染,指开发者获取到广告对象后,先用封面图字段在 feed 流中先渲染出一个封面图入口,用户点击封面图,再进入一个有 conainterView 的详细页,播放视频。Demo 工程中的 "竖版 Feed 视频" 就是开发者渲染的场景。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) GDTVideoRenderType videoRenderType GDT_DEPRECATED_MSG_ATTRIBUTE("接口即将废弃");
|
||||||
|
|
||||||
|
/**
|
||||||
|
构造方法
|
||||||
|
|
||||||
|
@param placementId 广告位ID
|
||||||
|
@return GDTUnifiedNativeAd 实例
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造方法, S2S bidding 后获取到 token 再调用此方法
|
||||||
|
* @param placementId 广告位 ID
|
||||||
|
* @param token 通过 Server Bidding 请求回来的 token
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithPlacementId:(NSString *)placementId token:(NSString *)token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
|
||||||
|
* 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
|
||||||
|
*/
|
||||||
|
- (void)setBidECPM:(NSInteger)eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
加载广告
|
||||||
|
*/
|
||||||
|
- (void)loadAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
加载广告
|
||||||
|
|
||||||
|
@param adCount 加载条数
|
||||||
|
*/
|
||||||
|
- (void)loadAdWithAdCount:(NSInteger)adCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞胜之后调用, 需要在调用广告 show 之前调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
*/
|
||||||
|
- (void)sendWinNotificationWithPrice:(NSInteger)price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞败之后调用
|
||||||
|
* @param price - 竞胜价格 (单位: 分)
|
||||||
|
* @param reason - 优量汇广告竞败原因
|
||||||
|
* @param adnID - adnID
|
||||||
|
*/
|
||||||
|
- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告平台名称
|
||||||
|
|
||||||
|
@return 当使用流量分配功能时,用于区分广告平台;未使用时为空字符串
|
||||||
|
*/
|
||||||
|
- (NSString *)adNetworkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当需要支持 VAST 广告时,需流量自行配置 adapter 的 vastClassName
|
||||||
|
*/
|
||||||
|
- (void)setVastClassName:(NSString *)vastClassName;
|
||||||
|
|
||||||
|
@end
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: acaa3d0d8835145d2863bd2f34a96888
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,178 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedNativeAdDataObject.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2018/10/10.
|
||||||
|
// Copyright © 2018 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTVideoConfig.h"
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, GDTVastAdEventType) {
|
||||||
|
GDTVastAdEventTypeUnknow,
|
||||||
|
GDTVastAdEventTypeLoaded,
|
||||||
|
GDTVastAdEventTypeStarted,
|
||||||
|
GDTVastAdEventTypeFirstQuartile,
|
||||||
|
GDTVastAdEventTypeMidPoint,
|
||||||
|
GDTVastAdEventTypeThirdQuartile,
|
||||||
|
GDTVastAdEventTypeComplete,
|
||||||
|
GDTVastAdEventTypeAllAdsComplete,
|
||||||
|
GDTVastAdEventTypeExposed,
|
||||||
|
GDTVastAdEventTypeClicked,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@interface GDTUnifiedNativeAdDataObject : NSObject <GDTAdProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告标题
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告描述
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
素材宽度,单图广告代表大图 imageUrl 宽度、多图广告代表小图 mediaUrlList 宽度
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSInteger imageWidth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
素材高度,单图广告代表大图 imageUrl 高度、多图广告代表小图 mediaUrlList 高度
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSInteger imageHeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
应用类广告App 图标Url
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *iconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告大图Url, 建议使用 bindImageViews:placeholder: 方法替代
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *imageUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
三小图广告的图片Url集合, 建议使用 bindImageViews:placeholder: 方法替代
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSArray *mediaUrlList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
应用类广告的星级(5星制度)
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) CGFloat appRating;
|
||||||
|
|
||||||
|
/**
|
||||||
|
应用类广告的价格
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, readonly) NSNumber *appPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为应用类广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isAppAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为视频广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为三小图广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isThreeImgsAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为微信原生页广告 (可针对此广告类型来控制按钮展示文案为"去微信看看")
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isWechatCanvasAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSInteger eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM等级
|
||||||
|
|
||||||
|
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSString *eCPMLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告对应的按钮展示文案
|
||||||
|
此字段可能为空
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSString *buttonText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告对应的CTA文案,自定义CTA视图时建议使用此字段
|
||||||
|
广告对应的callToAction文案,比如“立即预约”或“电话咨询”, 自定义callToAction视图时建议使用此字段
|
||||||
|
|
||||||
|
该字段在部分广告类型中可能为空
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSString *callToAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告是否可以跳过,用于做前贴片场景
|
||||||
|
|
||||||
|
@return YES 表示可跳过、NO 表示不可跳过
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL skippable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告播放配置
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong) GDTVideoConfig *videoConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) CGFloat duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VAST Tag Url,可能为空。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *vastTagUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VAST Content,可能为空。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *vastContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为 VAST 广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, readonly) BOOL isVastAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告是否有效,以下情况会返回NO,建议在展示广告之前判断,否则会影响计费或展示失败
|
||||||
|
* a.广告过期
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isAdValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
判断两个自渲染2.0广告数据是否相等
|
||||||
|
|
||||||
|
@param dataObject 需要对比的自渲染2.0广告数据对象
|
||||||
|
@return YES or NO
|
||||||
|
*/
|
||||||
|
- (BOOL)equalsAdData:(GDTUnifiedNativeAdDataObject *)dataObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定展示的图片视图
|
||||||
|
*
|
||||||
|
* @param imageViews 进行渲染的 imageView
|
||||||
|
* @param placeholder 图片加载过程中的占位图
|
||||||
|
*/
|
||||||
|
- (void)bindImageViews:(NSArray<UIImageView *> *)imageViews placeholder:(UIImage *)placeholder;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 49f16c974917c4cf586a86245cafa490
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,213 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedNativeAdNetworkAdapterProtocol.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by Nancy on 2019/6/27.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
|
||||||
|
@class GDTUnifiedNativeAdDataObject;
|
||||||
|
@protocol GDTUnifiedNativeAdNetworkConnectorProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol>
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger maxVideoDuration;
|
||||||
|
@property (nonatomic, assign) NSInteger minVideoDuration;
|
||||||
|
|
||||||
|
- (void)loadAdWithCount:(NSInteger)count;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@class GDTVideoConfig;
|
||||||
|
@protocol GDTUnifiedNativeAdDataObjectConnectorProtocol;
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdDataObjectAdapterProtocol <GDTAdProtocol>
|
||||||
|
|
||||||
|
@property (nonatomic, copy, readonly) NSString *title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告描述
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告大图Url
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *imageUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
素材宽度,单图广告代表大图 imageUrl 宽度、多图广告代表小图 mediaUrlList 宽度
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSInteger imageWidth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
素材高度,单图广告代表大图 imageUrl 高度、多图广告代表小图 mediaUrlList 高度
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSInteger imageHeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
应用类广告App 图标Url
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSString *iconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
三小图广告的图片Url集合
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly) NSArray *mediaUrlList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
应用类广告的星级(5星制度)
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) CGFloat appRating;
|
||||||
|
|
||||||
|
/**
|
||||||
|
应用类广告的价格
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, readonly) NSNumber *appPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为应用类广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isAppAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为视频广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isVideoAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否为三小图广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isThreeImgsAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
返回广告的eCPM,单位:分
|
||||||
|
|
||||||
|
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) NSInteger eCPM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) CGFloat duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告播放配置
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, nullable) GDTVideoConfig *videoConfig;
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
@property (nonatomic, copy, readonly) NSString *eCPMLevel;
|
||||||
|
|
||||||
|
@property (nonatomic, copy, readonly) NSString *callToAction;
|
||||||
|
|
||||||
|
@property (nonatomic, copy, readonly) NSString *buttonText;
|
||||||
|
|
||||||
|
@property (nonatomic, assign, readonly) BOOL skippable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VAST Tag Url,可能为空。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly, nullable) NSString *vastTagUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VAST Content,可能为空。
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy, readonly, nullable) NSString *vastContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为 VAST 广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isVastAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为微信原生页广告
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly) BOOL isWechatCanvasAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
判断两个自渲染2.0广告数据是否相等
|
||||||
|
|
||||||
|
@param dataObject 需要对比的自渲染2.0广告数据对象
|
||||||
|
@return YES or NO
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithUnifiedNativeAdDataObject:(GDTUnifiedNativeAdDataObject *)dataObject;
|
||||||
|
|
||||||
|
- (BOOL)equalsAdData:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject;
|
||||||
|
|
||||||
|
- (void)setRootViewController:(UIViewController * _Nullable)rootViewController;
|
||||||
|
- (void)registerConnector:(id <GDTUnifiedNativeAdDataObjectConnectorProtocol>)connector
|
||||||
|
clickableViews:(NSArray *)clickableViews;
|
||||||
|
- (void)registerClickableCallToActionView:(UIView *)callToActionView;
|
||||||
|
- (void)unregisterView;
|
||||||
|
|
||||||
|
//是否需要主动检测曝光,默认NO
|
||||||
|
- (BOOL)needsToDetectExposure;
|
||||||
|
//检测到曝光后调用
|
||||||
|
- (void)didRecordImpression;
|
||||||
|
|
||||||
|
//发送竞胜结果
|
||||||
|
- (void)sendWinNotification:(NSInteger)price;
|
||||||
|
|
||||||
|
//发送竞败结果
|
||||||
|
- (void)sendLossNotification:(NSInteger)price reason:(NSInteger)reason adnId:(NSString *__nullable)adnId;
|
||||||
|
|
||||||
|
//设置实际结算价
|
||||||
|
- (void)setBidECPM:(NSInteger)price;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@protocol GDTMediaViewAdapterProtocol <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
* 视频广告时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频广告已播放时长,单位 ms
|
||||||
|
*/
|
||||||
|
- (CGFloat)videoPlayTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
播放视频
|
||||||
|
*/
|
||||||
|
- (void)play;
|
||||||
|
|
||||||
|
/**
|
||||||
|
暂停视频,调用 pause 后,需要被暂停的视频广告对象,不会再自动播放,需要调用 play 才能恢复播放。
|
||||||
|
*/
|
||||||
|
- (void)pause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
停止播放,并展示第一帧
|
||||||
|
*/
|
||||||
|
- (void)stop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
播放静音开关
|
||||||
|
@param flag 是否静音
|
||||||
|
*/
|
||||||
|
- (void)muteEnable:(BOOL)flag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
自定义播放按钮
|
||||||
|
|
||||||
|
@param image 自定义播放按钮图片,不设置为默认图
|
||||||
|
@param size 自定义播放按钮大小,不设置为默认大小 44 * 44
|
||||||
|
*/
|
||||||
|
- (void)setPlayButtonImage:(UIImage *)image size:(CGSize)size;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3073546de38ee47b29af3e024d48d03a
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,67 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedNativeAdNetworkConnectorProtocol.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by Nancy on 2019/6/27.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "GDTUnifiedNativeAdView.h"
|
||||||
|
#import "GDTAdProtocol.h"
|
||||||
|
#import "GDTBaseAdNetworkAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdDataObjectAdapterProtocol;
|
||||||
|
@protocol GDTUnifiedNativeAdNetworkAdapterProtocol;
|
||||||
|
@protocol GDTMediaViewAdapterProtocol;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdNetworkConnectorProtocol <NSObject>
|
||||||
|
|
||||||
|
- (void)adapter:(id <GDTUnifiedNativeAdNetworkAdapterProtocol>)adapter
|
||||||
|
unifiedNativeAdLoaded:(NSArray<id <GDTUnifiedNativeAdDataObjectAdapterProtocol>> * _Nullable)unifiedNativeAdDataObjects
|
||||||
|
error:(NSError * _Nullable)error;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol GDTMediaViewConnectorProtocol <NSObject>
|
||||||
|
|
||||||
|
- (void)adapter_mediaViewDidTapped:(id <GDTMediaViewAdapterProtocol>)mediaView;
|
||||||
|
- (void)adapter_mediaViewDidPlayFinished:(id <GDTMediaViewAdapterProtocol>)mediaView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdDataObjectConnectorProtocol <GDTBaseAdNetworkConnectorProtocol>
|
||||||
|
|
||||||
|
@property (nonatomic, strong, readonly) GDTUnifiedNativeAdView *unifiedNativeAdView;
|
||||||
|
@property (nonatomic, strong, readonly) UIView <GDTMediaViewConnectorProtocol> *mediaView;
|
||||||
|
@property (nonatomic, strong, readonly) GDTLogoView *logoView;
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdViewWillExpose:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdViewDidClick:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdDetailViewClosed:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdViewApplicationWillEnterBackground:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdDetailViewWillPresentScreen:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdView:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject
|
||||||
|
playerStatusChanged:(GDTMediaPlayerStatus)status
|
||||||
|
userInfo:(nullable NSDictionary *)userInfo;
|
||||||
|
- (id <GDTUnifiedNativeAdDataObjectAdapterProtocol>) relatedDataObject;
|
||||||
|
|
||||||
|
- (void)adapter_unifiedNativeAdView:(id <GDTUnifiedNativeAdDataObjectAdapterProtocol>)dataObject
|
||||||
|
originDataObject:(GDTUnifiedNativeAdDataObject *)originDataObject
|
||||||
|
vastAdEventType:(GDTVastAdEventType)eventType;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ddaba949b7c8549028b2721e64b1cde7
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,176 @@
|
||||||
|
//
|
||||||
|
// GDTUnifiedNativeAdView.h
|
||||||
|
// GDTMobSDK
|
||||||
|
//
|
||||||
|
// Created by nimomeng on 2018/10/10.
|
||||||
|
// Copyright © 2018 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "GDTLogoView.h"
|
||||||
|
#import "GDTMediaView.h"
|
||||||
|
#import "GDTUnifiedNativeAdDataObject.h"
|
||||||
|
#import "GDTSDKDefines.h"
|
||||||
|
|
||||||
|
@class GDTUnifiedNativeAdView;
|
||||||
|
|
||||||
|
//视频广告时长Key
|
||||||
|
extern NSString* const kGDTUnifiedNativeAdKeyVideoDuration;
|
||||||
|
|
||||||
|
@protocol GDTUnifiedNativeAdViewDelegate <GDTAdDelegate
|
||||||
|
>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
/**
|
||||||
|
广告曝光回调
|
||||||
|
|
||||||
|
@param unifiedNativeAdView GDTUnifiedNativeAdView 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdViewWillExpose:(GDTUnifiedNativeAdView *)unifiedNativeAdView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告点击回调
|
||||||
|
|
||||||
|
@param unifiedNativeAdView GDTUnifiedNativeAdView 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdViewDidClick:(GDTUnifiedNativeAdView *)unifiedNativeAdView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告详情页关闭回调
|
||||||
|
|
||||||
|
@param unifiedNativeAdView GDTUnifiedNativeAdView 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdDetailViewClosed:(GDTUnifiedNativeAdView *)unifiedNativeAdView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
当点击应用下载或者广告调用系统程序打开时调用
|
||||||
|
|
||||||
|
@param unifiedNativeAdView GDTUnifiedNativeAdView 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdViewApplicationWillEnterBackground:(GDTUnifiedNativeAdView *)unifiedNativeAdView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告详情页面即将展示回调
|
||||||
|
|
||||||
|
@param unifiedNativeAdView GDTUnifiedNativeAdView 实例
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdDetailViewWillPresentScreen:(GDTUnifiedNativeAdView *)unifiedNativeAdView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告播放状态更改回调
|
||||||
|
|
||||||
|
@param nativeExpressAdView GDTUnifiedNativeAdView 实例
|
||||||
|
@param status 视频广告播放状态
|
||||||
|
@param userInfo 视频广告信息
|
||||||
|
*/
|
||||||
|
- (void)gdt_unifiedNativeAdView:(GDTUnifiedNativeAdView *)unifiedNativeAdView playerStatusChanged:(GDTMediaPlayerStatus)status userInfo:(NSDictionary *)userInfo;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface GDTUnifiedNativeAdView:UIView
|
||||||
|
|
||||||
|
/**
|
||||||
|
绑定的数据对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, readonly) GDTUnifiedNativeAdDataObject *dataObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频广告的媒体View,绑定数据对象后自动生成,可自定义布局
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, readonly) GDTMediaView *mediaView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
腾讯广告 LogoView,自动生成,可自定义布局
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, readonly) GDTLogoView *logoView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告 View 时间回调对象
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) id<GDTUnifiedNativeAdViewDelegate> delegate;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* viewControllerForPresentingModalView
|
||||||
|
* 详解:开发者需传入用来弹出目标页的ViewController,一般为当前ViewController
|
||||||
|
*/
|
||||||
|
@property (nonatomic, weak) UIViewController *viewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
自渲染2.0视图注册方法
|
||||||
|
|
||||||
|
调用方法之前请先判断[dataObject isAdValid]是否为YES,当为NO时调用不生效
|
||||||
|
|
||||||
|
@param dataObject 数据对象,必传字段
|
||||||
|
@param clickableViews 可点击的视图数组,此数组内的广告元素才可以响应广告对应的点击事件
|
||||||
|
*/
|
||||||
|
- (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject
|
||||||
|
clickableViews:(NSArray<UIView *> *)clickableViews;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
自渲染2.0视图注册方法
|
||||||
|
|
||||||
|
调用方法之前请先判断[dataObject isAdValid]是否为YES,当为NO时调用不生效
|
||||||
|
|
||||||
|
@param dataObject 数据对象,必传字段
|
||||||
|
@param clickableViews 可点击的视图数组,此数组内的广告元素才可以响应广告对应的点击事件
|
||||||
|
@param customClickableViews 可点击的视图数组,与clickableViews的区别是:在视频广告中当dataObject中的videoConfig的detailPageEnable为YES时,点击后直接进落地页而非视频详情页,除此条件外点击行为与clickableViews保持一致
|
||||||
|
*/
|
||||||
|
- (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject
|
||||||
|
clickableViews:(NSArray<UIView *> *)clickableViews customClickableViews:(NSArray <UIView *> *)customClickableViews;
|
||||||
|
|
||||||
|
/**
|
||||||
|
注册可点击的callToAction视图的方法
|
||||||
|
建议开发者使用GDTUnifiedNativeAdDataObject中的callToAction字段来创建视图,并取代自定义的下载或打开等button,
|
||||||
|
调用此方法之前必须先调用registerDataObject:clickableViews
|
||||||
|
@param callToActionView CTA视图, 系统自动处理点击事件
|
||||||
|
*/
|
||||||
|
- (void)registerClickableCallToActionView:(UIView *)callToActionView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
注销数据对象,在 tableView、collectionView 等场景需要复用 GDTUnifiedNativeAdView 时,
|
||||||
|
需要在合适的时机,例如 cell 的 prepareForReuse 方法内执行 unregisterDataObject 方法,
|
||||||
|
将广告对象与 GDTUnifiedNativeAdView 解绑,具体可参考示例 demo 的 UnifiedNativeAdBaseTableViewCell 类
|
||||||
|
*/
|
||||||
|
- (void)unregisterDataObject;
|
||||||
|
|
||||||
|
//#pragma mark - DEPRECATED
|
||||||
|
///**
|
||||||
|
// 此方法已经废弃
|
||||||
|
// 自渲染2.0视图注册方法
|
||||||
|
//
|
||||||
|
// @param dataObject 数据对象,必传字段
|
||||||
|
// @param logoView logo视图
|
||||||
|
// @param viewController 所在ViewController,必传字段。支持在register之后对其进行修改
|
||||||
|
// @param clickableViews 可点击的视图数组,此数组内的广告元素才可以响应广告对应的点击事件
|
||||||
|
// */
|
||||||
|
//- (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject
|
||||||
|
// logoView:(GDTLogoView *)logoView
|
||||||
|
// viewController:(UIViewController *)viewController
|
||||||
|
// clickableViews:(NSArray<UIView *> *)clickableViews GDT_DEPRECATED_MSG_ATTRIBUTE("use registerDataObject:clickableViews: instead.");
|
||||||
|
//
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// 此方法已经废弃
|
||||||
|
// 自渲染2.0视图注册方法
|
||||||
|
//
|
||||||
|
// @param dataObject 数据对象,必传字段
|
||||||
|
// @param mediaView 媒体对象视图,此处放视频播放器的容器视图
|
||||||
|
// @param logoView logo视图
|
||||||
|
// @param viewController 所在ViewController,必传字段。支持在register之后对其进行修改
|
||||||
|
// @param clickableViews 可点击的视图数组,此数组内的广告元素才可以响应广告对应的点击事件
|
||||||
|
// */
|
||||||
|
//- (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject
|
||||||
|
// mediaView:(GDTMediaView *)mediaView
|
||||||
|
// logoView:(GDTLogoView *)logoView
|
||||||
|
// viewController:(UIViewController *)viewController
|
||||||
|
// clickableViews:(NSArray<UIView *> *)clickableViews GDT_DEPRECATED_MSG_ATTRIBUTE("use registerDataObject:clickableViews: instead.");
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 738748c06458c47b49e1fc58931cae68
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,68 @@
|
||||||
|
//
|
||||||
|
// GDTVideoConfig.h
|
||||||
|
// GDTMobApp
|
||||||
|
//
|
||||||
|
// Created by royqpwang on 2019/5/16.
|
||||||
|
// Copyright © 2019 Tencent. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, GDTVideoAutoPlayPolicy) {
|
||||||
|
GDTVideoAutoPlayPolicyWIFI = 0, // WIFI 下自动播放
|
||||||
|
GDTVideoAutoPlayPolicyAlways = 1, // 总是自动播放,无论网络条件
|
||||||
|
GDTVideoAutoPlayPolicyNever = 2, // 从不自动播放,无论网络条件
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface GDTVideoConfig : NSObject
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频自动播放策略,默认 GDTVideoAutoPlayPolicyAlways,
|
||||||
|
选择 GDTVideoAutoPlayPolicyNever 策略时,需要开发者调用 GDTMediaView 的 play\pause 方法触发视频播、暂停,
|
||||||
|
或者开启 userControlEnable 设置,让用户点击 MediaView 控制播放状态
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) GDTVideoAutoPlayPolicy autoPlayPolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否静音播放视频广告,视频初始状态是否静音,默认 YES,
|
||||||
|
可通过 GDTMediaView muteEnable: 方法实时控制播放器j静音状态,
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL videoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
视频详情页播放时是否静音,默认NO,
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL detailPageVideoMuted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否启动自动续播功能,当在 tableView 等场景播放器被销毁时,广告展示时继续从上次播放位置续播,默认 NO
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL autoResumeEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
广告发生点击行为时,是否展示视频详情页
|
||||||
|
设为 NO 时,用户点击 clickableViews 会直接打开 App Store 或者广告落地页
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL detailPageEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否支持用户点击 MediaView 改变视频播放暂停状态,默认 YES
|
||||||
|
设为 YES 时,用户点击会切换播放器播放、暂停状态
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL userControlEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否展示播放进度条,默认 YES
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL progressViewEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
是否展示播放器封面图,默认 YES
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) BOOL coverImageEnable;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6762c69ae718d49b6becc58b3f53804f
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,80 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cbdc3e4dc51224e67a7da26482343306
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
: Any
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
Exclude Android: 1
|
||||||
|
Exclude Editor: 1
|
||||||
|
Exclude Linux64: 1
|
||||||
|
Exclude OSXUniversal: 1
|
||||||
|
Exclude Win: 1
|
||||||
|
Exclude Win64: 1
|
||||||
|
Exclude iOS: 0
|
||||||
|
- first:
|
||||||
|
Android: Android
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: ARMv7
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
OS: AnyOS
|
||||||
|
- first:
|
||||||
|
Standalone: Linux64
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
Standalone: OSXUniversal
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
Standalone: Win
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
Standalone: Win64
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: None
|
||||||
|
- first:
|
||||||
|
iPhone: iOS
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
AddToEmbeddedBinaries: false
|
||||||
|
CPU: AnyCPU
|
||||||
|
CompileFlags:
|
||||||
|
FrameworkDependencies:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: afa45b0fc93dc4a109cdf1507004f633
|
||||||
|
folderAsset: yes
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 50e20c7f90bbd4ef18dfc49d3409137a
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2b7c81a249a8b44d2a3944acd69e09ad
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// AnyThinkIronSourceAdapter.h
|
||||||
|
// AnyThinkIronSourceAdapter
|
||||||
|
//
|
||||||
|
// Created by Topon on 11/16/20.
|
||||||
|
// Copyright © 2020 AnyThink. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
//! Project version number for AnyThinkIronSourceAdapter.
|
||||||
|
FOUNDATION_EXPORT double AnyThinkIronSourceAdapterVersionNumber;
|
||||||
|
|
||||||
|
//! Project version string for AnyThinkIronSourceAdapter.
|
||||||
|
FOUNDATION_EXPORT const unsigned char AnyThinkIronSourceAdapterVersionString[];
|
||||||
|
|
||||||
|
// In this header, you should import all the public headers of your framework using statements like #import <AnyThinkIronSourceAdapter/PublicHeader.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b9156c225031a40a88e40efb6bff48fa
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ad822d33cf3ae4d129ca0154a2c29d70
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9a9e64125de774a17945f294e3000894
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
framework module AnyThinkIronSourceAdapter {
|
||||||
|
umbrella header "AnyThinkIronSourceAdapter.h"
|
||||||
|
|
||||||
|
export *
|
||||||
|
module * { export * }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9ec879a68c96346ce9cf1903d26b7564
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e6585d1f0a8cc4dc58d30c2424f7b602
|
||||||
|
folderAsset: yes
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
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,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3772ff473461b4bfdb4f680f05a761e2
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
//
|
||||||
|
// ISAdData.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 22/04/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISAdData : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, strong, readonly, nullable) NSString *serverData;
|
||||||
|
@property (nonatomic, strong, readonly) NSDictionary *configuration;
|
||||||
|
|
||||||
|
|
||||||
|
-(instancetype)initWithData:(nullable NSString*)serverData configuration:(NSDictionary*)configuration;
|
||||||
|
|
||||||
|
-(nullable NSString*)getString:(NSString* )key;
|
||||||
|
-(NSInteger)getInt:(NSString*)key;
|
||||||
|
-(BOOL)getBoolean:(NSString*)key;
|
||||||
|
-(nullable NSNumber*)getNumber:(NSString*)key;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bef8b589088df430b81b27da0a40ed7c
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue