Comments (19)
Ok, I got the Swift example application working, and added the .swift helper classes and bridging header to the OwrHelpers directory. Was there anything else you had in mind for this task?
from openwebrtc-examples.
Thanks @jrosssavant, merged #29.
from openwebrtc-examples.
No problem. I'm taking a look at SelfieSwift as well, but it's turning out to be a bit trickier. The best approach for this (and other native implementations) may be to create an Obj-C wrapper which can then be called from Swift.
from openwebrtc-examples.
Interesting. This is the design pattern Apple promotes for Swift <-> C++ interworking. What creates the problems, the callbacks?
from openwebrtc-examples.
Yes, and the type mismatch messages it gives are sometimes unhelpful or misleading. I'll keep working on it for a bit. If I get stuck, I'll push a branch and let you take a look.
from openwebrtc-examples.
After working on this a bit more, I can't seem to find a way to register a Swift function as a C function pointer callback. There are a number of StackOverflow topics that seem to confirm this is currently not possible:
http://stackoverflow.com/questions/25514176/using-swift-cfunctionpointer-to-pass-a-callback-to-coremidi-api
http://stackoverflow.com/questions/24107099/function-callback-from-c-to-swift
http://stackoverflow.com/questions/25346563/address-book-external-change-callback-in-swift-with-c-function-pointers
Until/if Apple updates Swift to support this, an Objective-C wrapper for these callbacks will most likely be required.
from openwebrtc-examples.
I pushed the branch with my work here: https://github.com/jrosssavant/openwebrtc-examples/tree/selfie-swift-attempt, just in case you'd like to take a look.
from openwebrtc-examples.
Hi @jrosssavant, when I try to build your selfie-swift-attempt, I received:
/Users/Bertug/Downloads/openwebrtc-examples-selfie-swift-attempt/ios/OwrHelpers/OpenWebRTC-BridgingHeader.h:30:9: error: 'owr.h' file not found
#import "owr.h"
^
:0: error: failed to import bridging header '/Users/Bertug/Downloads/openwebrtc-examples-selfie-swift-attempt/ios/OwrHelpers/OpenWebRTC-BridgingHeader.h'
Am I doing something wrong or missing out something? Or did you stop working on it?
from openwebrtc-examples.
@sentiasa This example uses the OpenWebRTC.framework installed from the iOS package. If you have not installed it, owr.h will not be found. How are you trying to build it?
from openwebrtc-examples.
@sentiasa If you want to use the OpenWebRTC pod, try changing the include to <owr/owr.h>
from openwebrtc-examples.
@superdump When I followed "https://github.com/EricssonResearch/openwebrtc/wiki/Building-OpenWebRTC"
this documentation, I have done everything successfully until 'Using the Results - iOS Framework' but when I installed openwebrtc-devel-0.1.0-ios-universal.pkg
(just to clear that my file is devel-0.1.0-ios-universal.pkg
rather than devel-0.3.0-ios-universal.pkg
even though I just updated) , no folder and files are created in ' ~/Library/Developer/OpenWebRTC/
' in my case. So I ended up dragging the framework from Library/Frameworks/
and manually added into SelfieSwift demo. So I also stuck in adding the header because I don't have ~/Library/Developer/OpenWebRTC/iPhone.sdk/OpenWebRTC.framework/Headers
either.
Then I gave up in the previous step and I tried the pod. However whatever I've tried, <owr/owr.h>
cannot be found. Can I achieve what I am trying to achieve with podfile? Can you help me what I should write in the Podfile? But I want to highlight again that ~/Library/Developer/OpenWebRTC/iPhone.sdk/OpenWebRTC.framework/Headers
folder doesn't exist for me whatever I have done.
Is there any simpler way for me to start this? Like creating a Podfile as same as I use to run NativeDemo? If so, what should I write in the Podfile? Again, NativeDemo works perfectly for me.
from openwebrtc-examples.
@sentiasa: As you guessed I have not worked on the SelfieSwift app in some time, but it was working at the time I last committed (8f2ccaf). At that time the OpenWebRTC libraries were linked into the demo app under the assumption that the openwebrtc repository was fully built for iOS, and that the openwebrtc repository was adjacent to the openwebrtc-examples repository. It looks like some changes have been made since that time to use the OpenWebRTC.framework - which I think is a great step forward. But I can't tell you how to get the correct framework into ~/Library/Developer/OpenWebRTC/iPhone.sdk/; that framework is not present on my machine (nor even ~/Library/Developer/OpenWebRTC). @superdump: is there a set of instructions that describes how to build and install the OpenWebRTC framework into that location? I have an old cerbero-based build which installs into /Library/Frameworks/OpenWebRTC.framework, but not into ~/Library.
from openwebrtc-examples.
If you build the iOS package according to the build instructions and then install the the .pkg file as instructed, it will land there.
Another alternative is to move it to use cocoapods instead.
from openwebrtc-examples.
Oh, and the appropriate package file is available in the OpenWebRTC release.
from openwebrtc-examples.
Thanks for pointing this out - I downloaded the .pkg from the release and now the SimpleDemoSwift project compiles just fine. I was trying to do the cerbero build from scratch but was running into this error when building the Mac OS X host build:
$ ./cerbero-uninstalled -c config/osx-x86-64.cbc package -f openwebrtc
...
checking for xmlcatalog... /Library/Frameworks/OpenWebRTC.framework/Versions/0.3/bin/xmlcatalog
checking for DocBook XML DTD V4.3 in XML catalog... not found
configure: error: could not find DocBook XML DTD V4.3 in XML catalog
from openwebrtc-examples.
That's something I broke yesterday and didn't manage to fix before I had to stop. First priority when I get to the office. 😄
from openwebrtc-examples.
I was getting this working: http://ericssonresearch.github.io/openwebrtc/docs/gtk-doc/dev/
from openwebrtc-examples.
The docbook issue should now be fixed.
from openwebrtc-examples.
Thanks, after a pull the build completed successfully and generated the package as expected.
from openwebrtc-examples.
Related Issues (20)
- android native demo failed to call web demo
- web/client/main.js SDP is not defined HOT 3
- main example broken, no errors reported
- simpledemo dont work in iphone5s,ios7.1.2,the warning is cannot inject custom Javascript
- Android NativeCall crashes on Join HOT 3
- Linux demo or exemple ? HOT 1
- Why Android project video is not clear,Please help me.
- Android NativeCall crashes on Join HOT 1
- NativeDemo crashed on iOS device HOT 2
- Can't connect the room in iOS NativeDemo app HOT 4
- OpenwebRTC web example doesn't work HOT 1
- i have downloaded android native call ,and setup with android studio.after running the app, i have given a session id and clicked on join button my app crashes and shows null pointer exception in onDisconnect method.here my code calling the onDisconnect() method directly .can you please help me .. HOT 2
- demo.openwebrtc.org uses an invalid SSL certificate HOT 3
- Can your NativeCall example run under x86 or x86_64 Android studio emulator HOT 1
- nativedemo is not work
- None of the Android demos seem to work for video, no error message.
- Android Native Call demo can not connect with local web demo
- Does someone has a working sample code of a openwebrtc sender or receiver?
- wowza webrtc
- Not Working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openwebrtc-examples.