Code Monkey home page Code Monkey logo

Comments (15)

ibc avatar ibc commented on July 21, 2024

Honestly no idea. But I don't even know whether you are using Xcode or Cordova CLI, nor your Swift or Xcode version.

It works, at least, with:

  • Xcode 6.3.2
  • Swift 1.2
  • NPM cordova 5.0.0

from cordova-plugin-iosrtc.

windht avatar windht commented on July 21, 2024

Thank you so much for replying!
I guess this may be the problem of swift two or Xcode beta because when I open the project the Xcode remind me whether to "update the syntax".
I am closing this issue and see if things can be solved in the next beta.

from cordova-plugin-iosrtc.

windht avatar windht commented on July 21, 2024

Hey I did a successfully build after Xcode default updating the syntax and changed some of the lines. However I have not yet tested it. Just want to ask @ibc are you going to update a swift 2 version of iosrtc after the stable release of it?

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

When Swift 2 becomes stable I will do my best effort to update the code so it runs in both Swift 2 and 1.2, sure. It would help if you mention what must be changed :)

from cordova-plugin-iosrtc.

windht avatar windht commented on July 21, 2024

After using the default update of syntax and some inline tips change I successfully built it and the getUserMedia worked pretty well. Below are the three changes I spotted.

  1. All "value" statements for PluginRTCTypes and throughout the plugin are changed to "rawValue".
  2. Some "!" are append to variables.
  3. The toggle function need to use the new "do try catch" error handler grammar.

And tons of warning mentioning change "var" to "let".

However, the connection worked bad and thread alert came out on RTCPeerConnectionDelegate. The very first event emitter emitted "signalingState:have-local-offer" and everything die. I am not very familiar with the method behind so I will have a deeper look and see if I can provide any more help.

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

Thanks. I will face it when I upgrade to Swift 2.0, but honestly I do not want to do it until it becomes stable. I will update the README though.

from cordova-plugin-iosrtc.

windht avatar windht commented on July 21, 2024

I found a way to make everything happen although it is really dirty.

Besides the three changes I mentioned earlier, I also commented out everything related to reading rawValue from RTCTypes and the self.eventListener methods (Although I know it may be important). However things worked pretty well after this.

Anyway, it is not a constructive way of doing things, so l am still looking forward for your update~!

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

I cannot understand how the plugin can even work without the calls to self.eventListener methods XD

OK, it's better that I wait until I get Swift 2.0.

Thanks.

from cordova-plugin-iosrtc.

windht avatar windht commented on July 21, 2024

Greetings @ibc , since Xcode 7 GM version is available now, are you planning to make an upgrade from swift 1.2 to 2.0?

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

I will update the code to Swift 2.0 once the currently OSX stable version asks me to upgrade Xcode to 7.0 stable.

from cordova-plugin-iosrtc.

1N50MN14 avatar 1N50MN14 commented on July 21, 2024

PS I just saw in the release notes of Xcode 7.0 (which just became available for download via the app store / update center / whatever the heck apple calls it) has a "Tool" to covert source code to Swift 2 via menu Edit > Convert > To Latestest Swift Syntax

FYI

from cordova-plugin-iosrtc.

jfrux avatar jfrux commented on July 21, 2024

Yeah, I ran the conversion.
It didn't solve EVERYTHING obviously.

There is still a handful of what I would consider minor things needing fixed to resolve errors.
But as @windht mentioned earlier, it sounds like there is more to it than just resolving syntax conversion issues.

My builds are halted until I find a solution to this.

You would think specifying that your app should b iOS 7.0 compatible that it would resort to using the Swift 1.2 compiler. How on earth can code compiled in Swift 2.0 run on iOS 7.0? Guess I don't fully understand it.

from cordova-plugin-iosrtc.

jfrux avatar jfrux commented on July 21, 2024

image

from cordova-plugin-iosrtc.

saghul avatar saghul commented on July 21, 2024

@joshuairl I adapted the exception handling code, can you give #70 a try?

from cordova-plugin-iosrtc.

jfrux avatar jfrux commented on July 21, 2024

@saghul I had posted this before I noticed your PR.
LGTM but have not tested my app much this morning since I used your branch last night. But it definitely was able to build successfully!

from cordova-plugin-iosrtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.