yonaskolb / yonaskolb/XcodeGen

Add a source folder as a group, but with any children folders as a folder

Open
#1,117 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

I'm working on a Safari web extension which includes a bunch of files and folders in a Resources directory. I need to bundle all of these files and folders, but without a parent "Resources" folder in my app extension. In Xcode it should look like:

Screen Shot 2021-08-17 at 4 59 19 PM

Unfortunately I can't find a straightforward way to do this with XcodeGen. If I hardcode each path I can do it, but the contents of this folder can change over time and I'd prefer to just pick up those changes from the file system.

I currently have them hardcoded like this:

    type: app-extension
    platform: iOS
    sources:
      - Sources
      - path: Resources/assets
        type: file
        buildPhase: resources
        group: Resources
      - path: Resources/background.js
        buildPhase: resources
        group: Resources
      - path: Resources/content.js
        buildPhase: resources
        group: Resources
      - path: Resources/manifest.json
        buildPhase: resources
        group: Resources
      - path: Resources/popup.html
        buildPhase: resources
        group: Resources
      - path: Resources/popup.js
        buildPhase: resources
        group: Resources

I'd prefer to be able to just specify the Resources path with some configuration to have it treated like this.

Is there already a way to do this, or is this something that can be easily accomodated?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with XcodeGen's source configuration handling and the existing sources entries shown in the issue. Determine how a directory path could include its files while representing child directories as folders, without creating a parent Resources group. Done means a single Resources path produces the requested Xcode structure and continues to include filesystem changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.