问题
I am using cordova-plugin-iosrtc.
I am experiencing the following error.
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.
Here is the code snippet
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)
}
)
I tried to cast UIView to UIwebview but that's also not happening.
回答1:
This is some version incompatibility problem.
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
来源:https://stackoverflow.com/questions/39677167/cannot-convert-value-of-type-uiview-to-expected-argument-type-uiwebview