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

How to keep files visible in Xcode but excluded from specific targets #1502

Open
andywpt opened this issue Sep 12, 2024 · 1 comment
Open

Comments

@andywpt
Copy link

andywpt commented Sep 12, 2024

Description

In the GUI interface, we can exclude a file from a target by unchecking the checkbox in the target membership section, the excluded file is still visible in Xcode.

Screenshot 2024-09-12 at 11 26 46 PM

However, when using the excludes keyword in XcodeGen, the excluded file is not visible in Xcode.
Currently, I'm able to workaround that using the following configuration:

sources:
      - path: HH
        excludes:
          - "**/*.{sh,yml}"
      - path: HH
        buildPhase: none

Is there a proper way of doing it? Any advise would be helpful :)

@Lutzifer
Copy link
Contributor

On Project Level, you can use FileGroups, see https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#project:

Example from one of our apps:

fileGroups:
  - Changelog.md
  - Mintfile
  - project.yml

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

2 participants