How to add Run script in build phase in GN build system for iOS

153 views
Skip to first unread message

anand agarwal

unread,
Dec 30, 2021, 12:38:25 PM12/30/21
to Chromium-dev
Hi All,

we are developing customised browser application for iOS and Android based on Open source chromium project. 
in iOS application , we are currently integrating Crashlytics framework to track crashes. Crashlytics dashboard  need to have DSYM file  to desymbolicate stack trace and give meaningful info, for this purpose Crashlytics framework has created one script to upload dysm file, every time whenever build is created and new dysm file is generated then this script automatically upload dsym file based on dsym path file and metadata info associated in google-info plist.  Crashlytics suggest to add this script as run script in build phase in Xcode editor. I have also attached screenshot for reference.

Since Xcode editor changes get lost as soon as out folder is generated from setup script iOS/build/tools/setup-gn.py so we can not manually add run script in build phase in Xcode for Chromium based source code .We want to add run script in build phase in GN build system without using Xcode editor, 

1. How we can execute script as part of build for iOS in GN build system
2. how to provide input files, script file name and path for that as shown in screenshots.

Regards,
Anand


Screenshot 2021-12-29 at 4.32.55 PM.png

Diptesh Patel

unread,
Mar 23, 2022, 10:17:35 AM3/23/22
to Chromium-dev, anand.i...@gmail.com
Hi Anand,
Can you share some snippet on how you have integrated the external library on Chromium iOS.

Regards,
Diptesh

Sylvain Defresne

unread,
Apr 4, 2022, 10:39:16 AM4/4/22
to anand.i...@gmail.com, Chromium-dev
You would do this by defining an `action` target in a BUILD.gn file. See `gn help action` for information on how this work. The action can take arbitrary parameter, and can depend on the chrome target to use a fully generated Chrome.app as inputs.
 
2. how to provide input files, script file name and path for that as shown in screenshots.

You would pass those via args parameter of the action target.
 

Regards,
Anand


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/3fbbd413-36f5-4e8e-8daa-9c56df9975adn%40chromium.org.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages