My project has 2 App Targets (App-A and App-B, 2 different iOS apps) and a few different dependency targets (static libraries) which are being used by both app targets.
One of the dependencies is our inhouse static framework that communicates with our backend. This framework has a run script that is run (before any code is compiled) to generate swift code. This script takes an input file that is different for each app target.
I want to set an environment variable in App Target which I can use in the static framework's run script to determine which input file to use.
I have tried setting the Project-> Build Settings-> User-defined
variable and setting appropriate values in App Target, but the static framework seems to get the values from Project Settings and not from Target Settings.
Is there any way where on Xcode I can pass a value from Target app to dependent static library and use it during the build?
I am using Xcode 11.3.1
Any help is appreciated, Thank you.