yonaskolb / yonaskolb/XcodeGen
Multi platform framework generation, umbrella headers, selective sources
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
Hey all,
We have Swift/ObjC framework that I am generating multi-platform versions of, and I have a couple of questions:
Selectively excluding files based on platform
- Is there a way to selectively exclude/include certain files based on platform? For example I have
Sources/Shared,Sources/iOSandSources/tvOSfolders and would like to selectively include the iOS folder for iOS platform and tvOS folder for tvOS platform.
I was able to sort of get there by using Sources/${platform} but that has strict checks on the folders existing and in some cases they may not.
Was able to solve this with optional: true on path.
Common umbrella header for multiple platforms
When specifying multiple platforms, the targets get generated with the name "MyModule_${platform}.framework", etc. My umbrella header that imports ObjC code is "MyModule.h" so when the module name changes it fails to find the umbrella header. I was able to work around that by creating a custom modulemap file, is this the correct approach?
Thanks!
Rog
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
Review the multi-platform target generation and umbrella-header/modulemap handling described in the issue; the named inputs are Sources/Shared, Sources/iOS, Sources/tvOS, MyModule.h, and a custom modulemap. Determine whether one umbrella header can work with platform-suffixed target names, and define the supported configuration or documentation needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, swift
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100