无法转换' UIView'类型的值预期参数类型' UIWebView'

无法转换' UIView'类型的值预期参数类型' UIWebView'

问题描述:

我正在使用cordova-plugin-iosrtc。

I am using cordova-plugin-iosrtc.

我遇到以下错误。


iOSRTCApp-master / platforms / ios / iOSRTCApp / Plugins / cordova-plugin-iosrtc / iosrtcPlugin.swift:622:24:
无法将'UIView'类型的值转换为预期参数类型
'UIWebView'

iOSRTCApp-master/platforms/ios/iOSRTCApp/Plugins/cordova-plugin-iosrtc/iosrtcPlugin.swift:622:24: Cannot convert value of type 'UIView' to expected argument type 'UIWebView'

根据存储库,我不应收到此错误。

According to repository,I should not get this error.

这是代码段

let pluginMediaStreamRenderer = PluginMediaStreamRenderer(
            webView:self.webView!,
            eventListener: { (data: NSDictionary) -> Void in
                let result = CDVPluginResult(status: CDVCommandStatus_OK, messageAsDictionary: data as [NSObject : AnyObject])

                // Allow more callbacks.
                result.setKeepCallbackAsBool(true);
                self.emit(command.callbackId, result: result)
            }
        )

我试图将UIView强制转换为UIwebview,但这也没有发生。

I tried to cast UIView to UIwebview but that's also not happening.

这是一些版本不兼容的问题。

This is some version incompatibility problem.

尝试安装以下科尔多瓦版本并添加兼容的iOS插件

Try to install the following cordova version and add the iOS plugin both are compatible

npm install -g cordova@5.2.0
cordova platform add ios