yonaskolb / yonaskolb/XcodeGen
Add dependency but not compile it
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
I'm trying to add binary from SPM-package to dependencies, but this binary is just executing in one of Build Phases on x86-64 arch and must not be included in compilation process of iOS app.
Thats how I include binary in project
packages:
R.Swift:
url: https://github.com/mac-cain13/R.swift
from: 5.0.0
targets:
Shared:
dependencies:
- package: R.Swift
product: rswift
link: false
But this way it also appears in "Link Binary With Libraries" section and compiler gives me error:
***.xcodeproj Building for iOS, but the linked item 'rswift' is building for macOS. You may need to configure 'rswift' to build for iOS.
After i delete from this section (it only appear in "Dependencies" section in Build Phases) everything becomes fine
Is there any way i can fix it using xcodegen without external scripts removing it after generation?
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 reproducing the shown package and target configuration, then inspect the generated Build Phases entries for the package product. The change is done when the binary remains a target dependency without appearing under Link Binary With Libraries, and the generated iOS project builds without an external cleanup script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100