Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #28

Closed
windht opened this issue Jun 26, 2015 · 15 comments
Closed

Build Error #28

windht opened this issue Jun 26, 2015 · 15 comments

Comments

@windht
Copy link

windht commented Jun 26, 2015

Hi,

I came with the lots of following error after following your guides in the building section.

'RTCSignalingState' does not have a member named 'value',

Am I facing some strange situations? Thank in advance.

FYI, I am using EL Capitan 2 and Xcode 7 Beta but installing on a iOS 8.3 machine.

@ibc
Copy link
Collaborator

ibc commented Jun 26, 2015

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

@windht
Copy link
Author

windht commented Jun 28, 2015

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.

@windht windht closed this as completed Jun 28, 2015
@windht
Copy link
Author

windht commented Jun 29, 2015

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?

@ibc
Copy link
Collaborator

ibc commented Jun 29, 2015

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 :)

@windht
Copy link
Author

windht commented Jun 29, 2015

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.

@ibc
Copy link
Collaborator

ibc commented Jun 29, 2015

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.

@windht
Copy link
Author

windht commented Jun 29, 2015

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~!

@ibc
Copy link
Collaborator

ibc commented Jun 29, 2015

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.

@windht
Copy link
Author

windht commented Sep 10, 2015

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

@ibc
Copy link
Collaborator

ibc commented Sep 10, 2015

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

@1N50MN14
Copy link

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

@jfrux
Copy link

jfrux commented Sep 18, 2015

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.

@jfrux
Copy link

jfrux commented Sep 18, 2015

image

@saghul
Copy link
Collaborator

saghul commented Sep 18, 2015

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

@jfrux
Copy link

jfrux commented Sep 18, 2015

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants