[iOS] How to add external framework in Chrome project!

662 views
Skip to first unread message

Phu Nguyen

unread,
Feb 14, 2017, 7:11:52 AM2/14/17
to Chromium-dev
Hi all!

I have a problem, i want to add Facebook.framework in to chromium project, It's able to do this?

Thanks!

Sylvain Defresne

unread,
Feb 14, 2017, 7:48:18 AM2/14/17
to nguyen...@gmail.com, Chromium-dev
To add a framework to a library, you need to do two things:
1. add the framework to the libs of the target that depends on it (libs += [ "Facebook.framework" ])
2. add the framework to the framework search path, by adding it to the cflags and ldflags of the target (common_flags = [ "-F", path_to_dir_with_framework ], cflags += common_flags, ld_flags += common_flags).

Usually this is done by defining a config object and then adding this to the target configs property. See for example how xctest_config is defined in src/build/config/ios/BUILD.gn.
-- Sylvain

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Phu Nguyen

unread,
Feb 14, 2017, 7:58:42 AM2/14/17
to Chromium-dev, nguyen...@gmail.com
OMG! Awesome! I tried to add this in 2 week! Thank you so much! I will try!

German Azcona

unread,
May 10, 2017, 3:16:26 PM5/10/17
to Chromium-dev, nguyen...@gmail.com
Did it work for you? I am trying to add Firebase and can't. Tried adding the flags on a different places but the build always fails. It just can't find the framework.

George Zhou

unread,
Jan 25, 2018, 2:39:39 PM1/25/18
to Chromium-dev, nguyen...@gmail.com
This part may be a little tricky


I also have to use path  such as
../../examples/objc/AppRTCMobile/ios
instead of
objc/AppRTCMobile/ios (most gn command use this path).

manoj...@kartrocket.com

unread,
May 4, 2018, 11:35:02 AM5/4/18
to Chromium-dev
I need to build chromium in iOS can you please help me how can i build iOS code.

David Lerner

unread,
Nov 5, 2019, 6:47:57 PM11/5/19
to Chromium-dev, nguyen...@gmail.com
Hi German,
We want to do the same thing.  Did you ever figure out how to make it work?
Thanks!

anand agarwal

unread,
Jul 23, 2021, 8:38:43 PM7/23/21
to Chromium-dev, David Lerner, nguyen...@gmail.com
Hi ,

Is anybody successfully integrated any third party framework? It would be great if we can get some snippet or idea.

Regards,
Anand

M shauket

unread,
Mar 12, 2022, 4:37:42 AM3/12/22
to Chromium-dev, anand.i...@gmail.com, David Lerner, nguyen...@gmail.com
Yes I am able to do that in chromium version 80

Diptesh Patel

unread,
Mar 23, 2022, 10:17:35 AM3/23/22
to Chromium-dev, mshauket....@gmail.com, anand.i...@gmail.com, David Lerner, nguyen...@gmail.com
Can you share some snippet of the gn files
Reply all
Reply to author
Forward
0 new messages