WebRTC.framework for macOS

2,760 views
Skip to first unread message

Thomas Baastrup Jacobsen

unread,
Feb 23, 2017, 7:14:34 AM2/23/17
to discuss-webrtc
Hello folks,

I'm having trouble building a WebRTC.framework for macOS. (I have no issues building one for iOS though)

It seems that there isn't created a ninja build target for the framework when creating build files for mac with gn, ie. a 'rtc_sdk_framework_objc' target isn't created.

Going through the steps explained here: https://webrtc.org/native-code/ios/
It says "The same checkout can be used for both Mac and iOS development". I have also tried with the steps explained here: https://webrtc.org/native-code/development/

fetch --nohooks webrtc_ios
gclient sync

gn gen out/macos --args='target_os="mac" target_cpu="x64" is_component_build=false'

And then:
ninja -C out/macos rtc_sdk_framework_objc
ninja: Entering directory `out/macos'
ninja: error: unknown target 'rtc_sdk_framework_objc'


Is there a different recommended way for implementing WebRTC on macOS?


Thanks,
Thomas

Kári Helgason

unread,
Feb 24, 2017, 3:58:54 AM2/24/17
to discuss-webrtc
Hi Thomas. Currently building the WebRTC framework for mac is not supported. We don't have a use case for it and it would be hard for us to maintain as it's not used.

See https://bugs.chromium.org/p/webrtc/issues/detail?id=6706 for a discussion on this topic.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/31e95591-0882-43c2-af24-99f4ae540edf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Baastrup Jacobsen

unread,
Feb 28, 2017, 3:41:52 AM2/28/17
to discuss-webrtc
Hi Kári,

That's unfortunate to hear. Thanks for your quick response though.


Cheers,
Thomas



On Friday, February 24, 2017 at 9:58:54 AM UTC+1, Kári Helgason wrote:
Hi Thomas. Currently building the WebRTC framework for mac is not supported. We don't have a use case for it and it would be hard for us to maintain as it's not used.

See https://bugs.chromium.org/p/webrtc/issues/detail?id=6706 for a discussion on this topic.
On Thu, Feb 23, 2017 at 12:22 PM, Thomas Baastrup Jacobsen <thb...@gmail.com> wrote:
Hello folks,

I'm having trouble building a WebRTC.framework for macOS. (I have no issues building one for iOS though)

It seems that there isn't created a ninja build target for the framework when creating build files for mac with gn, ie. a 'rtc_sdk_framework_objc' target isn't created.

Going through the steps explained here: https://webrtc.org/native-code/ios/
It says "The same checkout can be used for both Mac and iOS development". I have also tried with the steps explained here: https://webrtc.org/native-code/development/

fetch --nohooks webrtc_ios
gclient sync

gn gen out/macos --args='target_os="mac" target_cpu="x64" is_component_build=false'

And then:
ninja -C out/macos rtc_sdk_framework_objc
ninja: Entering directory `out/macos'
ninja: error: unknown target 'rtc_sdk_framework_objc'


Is there a different recommended way for implementing WebRTC on macOS?


Thanks,
Thomas

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Adrian B

unread,
Mar 1, 2017, 7:01:18 PM3/1/17
to discuss-webrtc
I was able to get WebRTC working on Mac OS using a modified version of the Makefile here:


Just had to update one of the include paths and add in a bunch of frameworks when linking.

diff --git a/Makefile b/Makefile
index 380dc3f..3e41e26 100644
--- a/Makefile
+++ b/Makefile
@@ -28,15 +28,15 @@ endif
 WEBRTCLIBPATH=$(WEBRTCROOT)/src/$(GYP_GENERATOR_OUTPUT)/out/$(WEBRTCBUILD)

 CFLAGS += -DWEBRTC_POSIX -fno-rtti -D_GLIBCXX_USE_CXX11_ABI=0
-CFLAGS += -I $(WEBRTCROOT)/src -I $(WEBRTCROOT)/src/chromium/src/third_party/jsoncpp/source/include
+CFLAGS += -I $(WEBRTCROOT)/src -I $(WEBRTCROOT)/src/third_party/jsoncpp/source/include/
 #detect
 TESTDEBUG=$(shell nm $(wildcard $(WEBRTCLIBPATH)/obj/webrtc/media/rtc_media/videocapturer.o $(WEBRTCLIBPATH)/obj/webrtc/media/librtc_media.a) | c++filt | grep std::__debug::vector >/dev/null && echo debug)
 ifeq ($(TESTDEBUG),debug)
        CFLAGS += -D_GLIBCXX_DEBUG=1
 endif
-LDFLAGS += -lX11 -ldl -lrt
+LDFLAGS += -F/System/Library/Frameworks -ldl -framework Foundation -framework AVFoundation -framework CoreServices -framework CoreFoundation -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework CoreGraphics -framework CoreMedia -framework CoreVideo

-WEBRTC_LIB = $(shell find $(WEBRTCLIBPATH)/obj/base -name '*.o')
+#WEBRTC_LIB = $(shell find $(WEBRTCLIBPATH)/obj/base -name '*.o')
 WEBRTC_LIB += $(shell find $(WEBRTCLIBPATH)/obj/webrtc -name '*.o' ! -path '*test*')
 WEBRTC_LIB += $(shell find $(WEBRTCLIBPATH)/obj/third_party -name '*.o')
 LIBS+=libWebRTC_$(GYP_GENERATOR_OUTPUT)_$(WEBRTCBUILD).a

Suman Cherukuri

unread,
Jun 23, 2020, 6:31:41 PM6/23/20
to discuss-webrtc
Hi,

I am trying to build webrtc_ios on mac but it failing with a lot of errors. Can you still build on mac with the latest XCode and macOS?

Adrian B

unread,
Jun 23, 2020, 6:49:47 PM6/23/20
to discuss-webrtc
I don't know. It's been a long time since I've done anything with WebRTC. Good luck.

Byoungchan Lee

unread,
Jun 24, 2020, 1:57:02 AM6/24/20
to discuss-webrtc
tools_webrtc/ios/build_ios_libs.py is what you need.
Reply all
Reply to author
Forward
0 new messages