Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheme not generated for Aggregate Target #1246

Closed
CraigSiemens opened this issue Aug 11, 2022 · 0 comments
Closed

Scheme not generated for Aggregate Target #1246

CraigSiemens opened this issue Aug 11, 2022 · 0 comments

Comments

@CraigSiemens
Copy link
Contributor

Our project/workspace has IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded set to false to prevent Xcode from autogenerating schemes, to avoid opening the project being really slow and enforce that all the schemes come from the project spec.

If we add an aggregate target, a scheme will not be generated for it.

name: Example
configs:
  Debug: debug
  Release: release
targets:
  Foo:
    type: bundle
    platform: macOS
    scheme:
      environmentVariables:
        MY_ENV_VAR: VALUE
aggregateTargets:
  Run-Script:
    buildScripts:
      - name: Run script
        script: |
          echo("Hello")
    scheme:
      environmentVariables:
        MY_ENV_VAR: VALUE

Steps to reproduce

  1. Run xcodegen on the above project.yml.
  2. Open the project
  3. Go to Project > Schemes > Manage Schemes...
  4. Uncheck "Autocreate schemes"
    Padded Screen Shot 2022-08-11 at 10 23 28 AM
  5. Run xcodegen again

Expected Result

There should be a scheme generated for the aggregate target Run-Script.

Actual Result

There was no scheme generated.

Workaround

A scheme has to be added to schemes for it to be generated. It still doesnt use any of the settings from scheme under Aggregate Target

schemes:
  Run-Script:
    build:
      targets:
        Run-Script: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant