YHInjectConfigManager.h 1.02 KB
//
//  YHInjectConfigManager.h
//  YH_Explorer
//
//  Created by 孙凯 on 2018/5/15.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>

@interface SchmeModel4wk : NSObject <NSCopying>

@property (nonatomic,strong) NSString *className;
@property (nonatomic,strong) NSString *schemeName;
@end

@interface YHInjectConfigManager : NSObject

@property (nonatomic,assign) BOOL allowsInlineMediaPlayback;

+ (instancetype)sharedInstance;

- (void)cycleInject:(UIWebView*)webView;

- (void)cycleInjectWKWebView:(WKWebView *)webView;

//初始化设置需要处理加载离线资源的类名及拦截的url scheme名
- (void)mockLocalURLResource:(NSArray <SchmeModel4wk *> *)array;
- (void)unMockLocalURLResource;

//cordova调用注册
- (void)registerURLSchemeHandler:(WKWebViewConfiguration *)config;

//更新wk的设置信息
- (void)updateWKWebViewSettingWithConfigureation:(WKWebViewConfiguration *)config;
//更新uiwebview的设置信息
- (void)updateUIWebViewSettingWithWebView:(UIWebView *)webView;

@end