Simple BUILD.gn for iOS framework and MacOS bundle

534 views
Skip to first unread message

Marin Luketin

unread,
Jan 12, 2020, 2:15:30 AM1/12/20
to discuss-webrtc
Hi,

I want to create my own libraries with my own classes that would use webrtc. I want to build:
- Framework for iOS (in xcode this would be iOS -> Framework & Library -> Framework) (I don't need the WebRTC.framework generated by build_ios_libs.py)
- Bundle for Mac (in xcode this would be macOS -> Framework & Library -> Bundle)

I can't find any simple examples on how to write BUILD.gn for it. Can anyone help?

Thank you!

Patrik Höglund

unread,
Jan 13, 2020, 1:48:37 AM1/13/20
to discuss-webrtc
Hi!


If you code search for each of those, you can find examples of their usage. For instance, for mac: https://source.chromium.org/chromium/chromium/src/+/master:content/shell/BUILD.gn;l=764?q=mac_framework_bundle&ss=chromium%2Fchromium%2Fsrc. Perhaps look into the gn code for WebRTC samples as well. This doesn't mean it will be easy but hopefully doable :)

/ P

--

---
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/ff378553-1de7-4b31-9f1f-85a97187556e%40googlegroups.com.

Marin Luketin

unread,
Jan 15, 2020, 8:14:22 AM1/15/20
to discuss...@googlegroups.com
Hi Patrik,

Thank you for the answer. I managed to build iOS .framework library.
Regarding the macOS, I need to generate a library with ".bundle" extension. As far as I understand, the link you provided is for generating ".framework" for macOS and not ".bundle".
Do you maybe know of an example for ".bundle"?

Thanks!

Alexandre GOUAILLARD

unread,
Jan 15, 2020, 9:25:06 AM1/15/20
to discuss...@googlegroups.com
are you sure about the extension?



--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------

Marin Luketin

unread,
Jan 16, 2020, 5:46:40 AM1/16/20
to discuss...@googlegroups.com
Hi Alexandre,
Yes, I am sure about the extension. On the wikipedia page you provided, what I need is "macOS loadable bundle" that has .bundle extension.
In Xcode (version 11.3), creating a Bundle project can be done by: Open Xcode -> Create a new Xcode project -> Select macOS on top  -> Under Framework & Library there is a Bundle type.



Alexandre GOUAILLARD

unread,
Jan 18, 2020, 12:12:31 AM1/18/20
to discuss...@googlegroups.com
Thanks a lot, I had missed it.

Reading further (here, and here), it does not look like the structure of a loadable bundle is very different from an app bundle or framework, you might get away with shuffling the files around, especially if the only thing you would want to do is loading the webrtc lib.

Reply all
Reply to author
Forward
0 new messages