illusionspaces / WKJavaScriptBridge

一款基于WKWebView构建的JSBridge框架,插件化集成,一行代码即可使用,支持iOS8+。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

为什么TestSecurityPlugin与WKCommonPlugin都注册不成功?

JunfengHu1996 opened this issue · comments

在WKJavaScriptBridgePluginAnnotation.m文件中的registedAnnotationModules函数里,whiteListPlugin数组里始终为空,说明TestSecurityPlugin与WKCommonPlugin都没注册成功,但是TestWebPluginSecurityConfig.h文件里已经都有写下面的代码了

// 配置安全插件
@WKConfigSafePlugin(TestSecurityPlugin)

// 配置插件白名单:类名 方法名 安全级别
// B级
@WKConfigPluginSafeLevel(WKCommonPlugin,asyncTestSecurity,2)
// C级
@WKConfigPluginSafeLevel(WKCommonPlugin,asynDisplayCommon,3)