yonaskolb / yonaskolb/XcodeGen
Including target from existing external Xcode project
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
I'm currently working on a build system that uses prebuilts for dependency frameworks/libraries. We want the ability to use the project file instead of the prebuilt library for debug. I have a model working which I manually built a workspace, but am aiming to build this workspace dynamically with xcodegen. This is because the blend of prebuilts to projects is dependent upon the scenario. The main application project always exists in the workspace.
The key to how this works is creating a "bootstrap" project. This bootstrap contains an aggregate target which is really just a dummy target for the scheme. The scheme does all the work to make this work. The scheme contains a preaction script. This preaction script copies over necessary configurations (in particular, anxcconfig file). The scheme also has the application's target as a build target.
There are really 2 issues here I've encountered when trying to get xcodegen to generate the bootstrap project file.
ExecutionActiondoes not support defining the shell to use for the script (BuildScriptdoes)- My application's target is in an existing external project. It isn't not clear how or if external targets are supported.
So the two questions are:
- Can we define the shell to use in the
ExecutionAction? - Can we and if we can, what is the correct syntax to reference external targets? In particular, this external target is to be added to a scheme's target list.
Note I generate the workspace with XcodeProj. The code seems relatively difficult for creating the project and adding custom schemes (based on looking at some of the XcodeGen code). Thus why I'm looking at this. Right now the plan is to call do this via the command line, but ideally I'd like to do this via using XcodeGen as a library, but it also isn't clear in this latter case if I lose the niceties done by the generate command.
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
Start by tracing XcodeGen's handling of ExecutionAction and scheme target lists, then compare those paths with the existing BuildScript shell configuration. Determine whether external project targets can be represented in generated schemes and whether ExecutionAction can select a shell; done means both requested capabilities have a documented, usable configuration or a clearly scoped limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100