无法转换' UIView'类型的值预期参数类型' UIWebView' [英] Cannot convert value of type 'UIView' to expected argument type 'UIWebView'

查看:117
本文介绍了无法转换' 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

这篇关于无法转换' UIView'类型的值预期参数类型' UIWebView'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆