yonaskolb / yonaskolb/XcodeGen

Multi platform framework generation, umbrella headers, selective sources

Open
#687 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

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
  1. Is there a way to selectively exclude/include certain files based on platform? For example I have Sources/Shared, Sources/iOS and Sources/tvOS folders 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.