rules_xcodeproj icon indicating copy to clipboard operation
rules_xcodeproj copied to clipboard

Feature Request: Add run scripts to the actual App Target instead of `BazelDependencies` target

Open sanju-naik opened this issue 1 year ago • 3 comments

Problem

Today when we add run scripts they get added to the BazelDependencies target instead of the actual Target. With this approach we lose on using some of Xcodebuild ENV variables such as TARGET_NAME & DERIVED_FILE_DIR in run scripts, so instead of adding these scripts to the BazelDependencies, is it possible to add them to the actual app target itself?

What I am trying to do

We have a script to copy some files to the generated app bundle, To do this I need to access TARGET_BUILD_DIR but that's not available when for BazelDependencies target.

Feature request

When we pass pre_build & post_build scripts to rules_xcodeproj, instead of adding them to BazelDependencies, is it possible to add them to the top_level_targets of type Application? This would ensure we have all Xcode's ENV vars available.

sanju-naik avatar Apr 25 '23 14:04 sanju-naik

What are your specific use cases you are trying to solve?

brentleyjones avatar Apr 25 '23 14:04 brentleyjones

This is what I am trying to do :
We have a script to copy some files to the generated app bundle, To do this I need to access TARGET_BUILD_DIR but that's not available when for BazelDependencies target.

Update it in the issue description as well.

sanju-naik avatar Apr 25 '23 14:04 sanju-naik

These files are from Security Framework to detect Fraud on the app.

sanju-naik avatar Apr 25 '23 14:04 sanju-naik