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

Native example app for iOS that works with http://demo.openwebrtc.io #28

Closed
jrosssavant opened this issue Dec 12, 2014 · 25 comments
Closed
Assignees

Comments

@jrosssavant
Copy link
Contributor

I was able to download and build the OpenWebRTC libraries, and build and run the iOS Selfie and SimpleDemo apps. I'm interested to develop an app that includes OpenWebRTC, but I want to avoid using a WebView and the bridge. Can you give me a few pointers for how to get started with a full native implementation beyond the Selfie app?

Thanks,
Joe

@stefanalund
Copy link
Contributor

Hi @jrosssavant, I have started working on such an app for iOS, and @Rugvip is looking in to the Android version. The idea is to use in native EventSource library to connect to the server, and then use the OpenWebRTC C API's to set up media. I can probably share some work-in-progress code in a few days.

@stefanalund stefanalund assigned stefanalund and Rugvip and unassigned stefanalund Dec 13, 2014
@jrosssavant
Copy link
Contributor Author

@stefanalund @Rugvip Thanks for looking at this. I'll keep studying to understand the OpenWebRTC code and follow along as you push new commits. I'm also taking a look at Swift versions of the existing examples for Issue #25.

@stefanalund
Copy link
Contributor

@Rugvip has created a native Android app: #31 Hopefully it should be possible to use it as a reference for designing a iOS native app.

Would be fantastic if you want to have a crack at it, here's a gist for the native EventSource channel: https://gist.github.com/stefanalund/a15c87acf85d922262d7 As you can see it's incomplete (and written in Objective-C :))

@jrosssavant
Copy link
Contributor Author

Excellent, thanks for providing this. I'll take a run at the iOS app and let you know how it goes. No problem that it's in Obj-C, I actually have way more Obj-C experience than Swift.

@stefanalund
Copy link
Contributor

I've asked @Rugvip to also have a look at making a version of the native app for iOS. Please let us know @jrosssavant if you have made in progress so that we can avoid double work. Thanks.

@jrosssavant
Copy link
Contributor Author

No, I never made it very far on this. I ran into a few stumbling blocks early on and then had my priorities pulled away. However, we're still interested in the iOS native app. I encourage you to push commits as you go and I'll keep my eye on them and contribute as I can. Thanks!

@stefanalund
Copy link
Contributor

We will be sure to keep you in the loop!

@jrosssavant
Copy link
Contributor Author

Alright, my other priorities have cleared up and I'm back to looking at this. I'm in the process of syncing and rebuilding recent changes: would it be best for me to work based on the openwebrtc master branch and build instructions from the wiki, or should I use the nirbheek/cerbero openwebrtc branch?

@stefanalund
Copy link
Contributor

As new apps submitted to the App Store from now on requires 64-bit support, I would recommend start using the Cerbero build system as 64-bit is supported:

https://github.com/EricssonResearch/openwebrtc/wiki/Building-OpenWebRTC-with-Cerbero

@jrosssavant
Copy link
Contributor Author

Thanks, using cerbero worked great for me. Now that I've got the Android native call app working per #31, I'm starting to look at how to apply this to iOS. It seems pretty straightforward, but one thing I'm realizing is that working with the C APIs is a little awkward and I'm wanting to wrap each C object in an Obj-C object. This works but is time-consuming, and I'm maintaining a C -> Obj-C map so that I can forward C callbacks to the appropriate Obj-C object.

Have you considered offering an Obj-C wrapper layer? I haven't dug into the details of how the Java binding works, but I hope it might be possible to do something similar for Obj-C.

@stefanalund
Copy link
Contributor

To be clear, this is because you are using Swift, right?

@stefanalund
Copy link
Contributor

This test app in C might also be a useful reference EricssonResearch/openwebrtc#129

@jrosssavant
Copy link
Contributor Author

My application uses Obj-C and Swift. Integrating a C implementation is certainly possible, and that sample app you linked is very helpful. But it'd be nicer for iOS devs if there was an Obj-C or Swift interface. The main thing I want to avoid is jumping between two memory management schemes.

@stefanalund
Copy link
Contributor

I certainly agree that would be better, especially as more and more developers adopt Swift in their apps. We will put that on the backlog.

@stefanalund
Copy link
Contributor

I have started working on this again and have a WIP skeleton for an app here: #49

@loebpaul
Copy link

Hi @stefanalund, I've been following this development closely. Is there any update to the progress on the Objective-C bridge? Thanks!

@stefanalund
Copy link
Contributor

Working on it now, hope to have a working app end of next week.

@loebpaul
Copy link

amazing, thanks for the update!

@stefanalund stefanalund assigned stefanalund and unassigned Rugvip Mar 13, 2015
@stefanalund
Copy link
Contributor

@loebpaul there is a work-in-progress PR that you can follow here: #49

@stefanalund
Copy link
Contributor

A first version of the NativeDemo app has now landed: https://github.com/EricssonResearch/openwebrtc-examples/tree/master/ios/NativeDemo

Still a lot of minor things that should be fixed in the app, such as properly handling rotation, but let's open new Issues for those. Feel free to pick this up and make improvements! :)

@sentiasa
Copy link

Thanks for the NativeDemo. It seems brilliant. I was wondering, if I convert the whole code to Swift, will it work as it is now or it may crash because of OpenWebRTC-iOS-SDK? Or are you planning to create another example on Swift too?

@superdump
Copy link
Contributor

You basically need to wrap all of the OpenWebRTC C API to Objective-C and then bridge that to Swift or something as I recall. Alternatively, perhaps that could be done for the iOS SDK API only, but I'm not sure if that is sufficient. @Rugvip @stefanalund ?

@stefanalund
Copy link
Contributor

@sentiasa creating a version in Swift is not on our immediate todo list, even though it would be nice to have it. I don't expect any problems using the iOS SDK from Swift. It would be really awesome if you tried and contributed back the result 😃

@zhangguoyong
Copy link

@sentiasa if the NativeDemo Support multiplayer video conferencing ,thanks

@zhangguoyong
Copy link

Hello everyone,I recently made webRTC multiplayer video, Who used to multiplayer video,And can give me a demo, thank you very much。

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

7 participants