yonaskolb / yonaskolb/XcodeGen

feat: let `inferDestinationFiltersByPath` to be smarter

Open
#1,579 0 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 encountered the following case: I need to 1) add View.swift for all platforms except watchOS and 2) add View_watchOS.swift only for watchOS. (relevant if you create a widget and want View to be different for the mentioned platforms)
inferDestinationFiltersByPath allows you to make the second item, but does not allow the first, so I suggest implementing this behavior.
Of course, it is possible to create only View.swift with the following condition:

#if os(watchOS)
struct View: SwiftUI.View {}
#else
struct View: SwiftUI.View {}
#endif

But View can be big and keeping everything in one file can be inconvenient.
What do you think? Feel free to close this issue as not planned if you feel such a feature would not fit XcodeGen’s philosophy
Thank you!

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 by locating inferDestinationFiltersByPath in XcodeGen and tracing how it handles platform-specific paths. Define the expected behavior for a file included on all platforms except watchOS alongside a watchOS-only file, then verify that both path patterns produce the intended destination filters.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.