yonaskolb / yonaskolb/XcodeGen
Enhancement: copyFiles buildPhase using Products
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
First thing first, let me show you concept:
Note that this is just a concept and is not a valid syntax
targets:
Sample Application:
type: application
platform: macOS
sources:
target: Helper
optional: true
buildPhase:
copyFiles:
destination: wrapper
subpath: $(CONTENTS_FOLDER_PATH)/Library/LoginItems
Helper:
type: application
platform: macOS
- Here I'm creating
Sample Applicationwhich is the main application target, and the helper applicationHelper.Helperapplication will be used to toggleLaunch on Loginfeature which is seen in many applications. To make it work, a helper application must be included in the main app bundle, in this case it's:
Sample Application.app/Contents/Library/LoginItems/Helper.app.- This is the latest and valid way to achieve the feature as of today.
- Reference: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html
Back to xcodegen, if I'm correct, this is not possible as of v2.18.0 (Please correct me if I'm missing something).
The above is just an example to explain the usefulness if it's possible. And this is not specific to the LoginItem thing, there may be other cases that can use this approach, I guess.
Thus, "copyFiles buildPhase using Products". (I'm not sure if sources is the suitable location to put them, this is just a concept)
What do you think?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reviewing how XcodeGen v2.18.0 represents sources, Products, and copyFiles build phases, then compare that model with the YAML concept and define coverage for copying a Helper product into the specified wrapper subpath. Done means the supported syntax and its generated Xcode project behavior are documented and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100