cordova-rtc / cordova-plugin-iosrtc

Cordova iOS plugin exposing the WebRTC W3C API
MIT License
688 stars 340 forks source link

Cannot convert value of type 'UIView' to expected argument type 'UIWebView #125

Closed FredLuart closed 8 years ago

FredLuart commented 8 years ago

Hello,

I have following issue when trying to build an application on XCode :

PROJECT_DIR/platforms/ios/HelloCordova/Plugins/cordova-plugin-iosrtc/iosrtcPlugin.swift:620:25: Cannot convert value of type 'UIView' to expected argument type 'UIWebView'

Do you have an idea to solve it ?

My versions are : XCode 7.2 Cordova 6.0.0

Thanks in advance

saghul commented 8 years ago

What cordova-ios version are you using? Only <= 4 is supported. Can you try this branch? https://github.com/saghul/cordova-plugin-iosrtc/tree/ios-platform-4

On Wed, Feb 3, 2016 at 6:59 PM, Frederic Luart notifications@github.com wrote:

Hello,

I have following issue when trying to build an application on XCode :

PROJECT_DIR/platforms/ios/HelloCordova/Plugins/cordova-plugin-iosrtc/iosrtcPlugin.swift:620:25: Cannot convert value of type 'UIView' to expected argument type 'UIWebView'

Do you have an idea to solve it ?

My versions are : XCode 7.2 Cordova 6.0.0

Thanks in advance

— Reply to this email directly or view it on GitHub https://github.com/eface2face/cordova-plugin-iosrtc/issues/125.

/Saúl bettercallsaghul.com

FredLuart commented 8 years ago

I am using Cordova 3.9.2

ShongSu commented 8 years ago

Hi Saghul, I tried https://github.com/saghul/cordova-plugin-iosrtc/tree/ios-platform-4 with cordova 6.0.0 and iOS 4.0.1, it compiles well, but when I try to make a video call from my app, I got this run time error on this line The error shows that Thread 1: EXC_BAD_ACCESS(code=1,address=0x18)

The logs look like:

2016-02-04 17:05:44.863 NewApp[4848:2241420] iosrtcPlugin#getUserMedia()
2016-02-04 17:05:44.863 NewApp[4848:2241420] PluginGetUserMedia#call()
2016-02-04 17:05:45.106 NewApp[4848:2241420] PluginGetUserMedia#call() | video authorization: authorized
2016-02-04 17:05:45.108 NewApp[4848:2241420] PluginGetUserMedia#call() | audio authorization: authorized
2016-02-04 17:05:45.110 NewApp[4848:2241420] PluginGetUserMedia#call() | video requested (device not specified)
2016-02-04 17:05:45.130 NewApp[4848:2241420] PluginGetUserMedia#call() | chosen video device: <AVCaptureFigVideoDevice: 0x14dc43a70 [Front Camera][com.apple.avfoundation.avcapturedevice.built-in_video:1]>
 NewApp was compiled with optimization - stepping may behave oddly; variables may not be available.
2016-02-04 17:05:45.158 NewApp[4848:2241420] PluginGetUserMedia#call() | audio requested
2016-02-04 17:05:45.159 NewApp[4848:2241420] PluginMediaStream#init()
2016-02-04 17:05:45.159 NewApp[4848:2241420] PluginMediaStreamTrack#init()
2016-02-04 17:05:45.159 NewApp[4848:2241420] PluginMediaStreamTrack#run() [kind:audio, id:61159A52-8D1D-4818-8C65-E08D445FE90A]
2016-02-04 17:05:45.159 NewApp[4848:2241420] PluginMediaStreamTrack#init()
2016-02-04 17:05:45.159 NewApp[4848:2241420] PluginMediaStreamTrack#run() [kind:video, id:DE861E52-B116-41A3-9023-6EE0A5E77232]
2016-02-04 17:05:45.159 NewApp[4848:2241420] PluginMediaStream#run()

(lldb) `

do you have any idea about it? Thanks

ibc commented 8 years ago

Just cordova < 4 is supported.

saghul commented 8 years ago

Sorry @ShongSu I never made it past that :-( Thanks for confirming the happens to you though...

FredLuart commented 8 years ago

You have closed the issue but I have no answer about my question. Do you have any idea ?

saghul commented 8 years ago

@FredLuart I've only seen that problem with Cordova-iOS 4, are you certain you're running 3.9.2?

ibc commented 8 years ago

Hi Saghul, I tried https://github.com/saghul/cordova-plugin-iosrtc/tree/ios-platform-4 with cordova 6.0.0 and iOS 4.0.1

As @saghul said, that environment does not work yet, even in his fork.

FredLuart commented 8 years ago

Yes Sorry, this is my fault ! I am on 4.0.1 in my new project ! I have checked in another project ... Thank you ! I will modify my project to use 3.9.2

saghul commented 8 years ago

Thanks for confirming @FredLuart.

Aknilam commented 8 years ago

Should it work now on cordova-ios 4.X, as documentation says? I have the same error in 630 line.

ibc commented 8 years ago

Yes, it works.

realnumber commented 7 years ago

@ShongSu I solved that issue by adding these two lines in Resources/iOSRTCApp-Info.plist

      <key>NSCameraUsageDescription</key>
      <string>NSCameraUsageDescription</string>