Open Uki19 opened 4 months ago
@Uki19 do you have a proposal for how this would look? Also if using the more fully featured schemes is difficult, there are also scheme templates that may cut down on the boilerplate required for you, if you weren't aware of them https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#scheme-template
for example, there could be buildTargets
or additionalTargets
, like there's testTargets
option:
targets:
AppTarget:
...
Widgets:
type: app-extension
subtype: widgetkit-extension
platform: iOS
deploymentTarget: 15.0
configFiles:
DEV Debug: some-dev.xcconfig
DEV Release: some-dev.xcconfig
PROD Debug: some-prod.xcconfig
PROD Release: some-prod.xcconfig
scheme:
configVariants:
- DEV
- PROD
buildTargets: <-- here
- AppTarget: all
- AppIntentsExtension: all
...
AppTarget
name could be derived via target_name variable, or passed in as templateAttributes
:
// templates:
Widgets:
...
buildTargets: <-- here
- ${mainTargetName}: all
- ${mainTargetName}ntentsExtension: all
// actual targets:
targets:
AppWidgets:
templates:
- Widgets
templateAttributes:
mainTargetName: App
We ended up using schemeTemplates for now which did reduce the boilerplate, but this could help us improve it even further 🙂
Similarly to
testTargets
, it would be useful to be able to define additional targets within target-scheme.For example, Widgets target scheme should have
AppTarget
added as build target, but currently it doesn't seem possible.It is possible to do using top level scheme, but since we have 3+ configVariants in 3+ app "flavours" (whitelabel app), we'd like to rely on using
configVariants
and avoid manually specifying scheme for each target/config/flavour combination