TapCommon-Unity/Plugins/iOS/TapCommonSDK.framework/Headers/TDSWKWebViewJavascriptBridge.h

36 lines
1.1 KiB
C
Raw Normal View History

2023-09-20 15:13:57 +08:00
//
// WKWebViewJavascriptBridge.h
//
// Created by @LokiMeyburg on 10/15/14.
// Copyright (c) 2014 @LokiMeyburg. All rights reserved.
//
#if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_9 || __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_1)
#define supportsWKWebView
#endif
#if defined supportsWKWebView
#import <Foundation/Foundation.h>
#import <TapCommonSDK/TDSWebViewJavascriptBridgeBase.h>
#import <WebKit/WebKit.h>
@interface TDSWKWebViewJavascriptBridge : NSObject<WKNavigationDelegate, TDSWebViewJavascriptBridgeBaseDelegate>
+ (instancetype)bridgeForWebView:(WKWebView*)webView;
+ (void)enableLogging;
- (void)registerHandler:(NSString*)handlerName handler:(TDSWVJBHandler)handler;
- (void)removeHandler:(NSString*)handlerName;
- (void)callHandler:(NSString*)handlerName;
- (void)callHandler:(NSString*)handlerName data:(id)data;
- (void)callHandler:(NSString*)handlerName data:(id)data responseCallback:(TDSWVJBResponseCallback)responseCallback;
- (void)reset;
- (void)setWebViewDelegate:(id)webViewDelegate;
- (void)disableJavscriptAlertBoxSafetyTimeout;
- (NSArray<NSString *> *)getSupportHandlerNameArray;
@end
#endif