2024-06-07 11:41:02 +08:00

47 lines
990 B
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// BaiduMobAdHybridAdManager.h
// XAdSDKDevSample
//
// Created by lishan04 on 09/04/2018.
// Copyright © 2018 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>
@protocol BaiduMobAdHybridAdManagerDelegate <NSObject>
@optional
/**
* 广告展示失败
*/
- (void)failedDisplayAd;
/**
* 广告展示成功
*/
- (void)didAdImpressed;
/**
* 广告点击
*/
- (void)didAdClicked;
@end
@interface BaiduMobAdHybridAdManager: NSObject
@property (nonatomic, copy) NSString *publisherId;
@property (nonatomic, weak) id <BaiduMobAdHybridAdManagerDelegate> delegate;
//重要把wkwebview传给BaiduMobAdHybridAdManager进行注册
- (void)injectJavaScriptBridgeForWKWebView:(WKWebView *)webview;
//重要在wkwebview回调时通知BaiduMobAdHybridAdManager返回是否继续加载
- (BOOL)webView:(WKWebView *)webView shouldStartLoadForNavigationAction:(WKNavigationAction *)navigationAction;
@end