yonaskolb / yonaskolb/XcodeGen
Frameworks not Embedding/Linking when SPM package is added with app extension.
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
In our project we are using multiple app extensions with multiple local targets and multiple packages. We are encountering with an issue where the local targets are not getting embedded with main application target if we use SPM packages and if we add the same target in app extensions as dependencies.
But if we don't add app extensions every target will embed/link properly. Or if we dont add SPM packages it will embed/link properly. But when both of them is integrated the above issue arise.
Strange thing is, the app builds properly but in run time it fails to link and gives Library not loaded error.
This wont happen with simulator. You will have to run in Device.
Attached a sample project with reproducible case. Please run it in device with automatic signing in with iOS >= 16.
XcodeGenImpl.zip
Please comment the app extension target and dependency both in project.yml to see a working application.
Note:
If you face any problem with XcodeF.xcodeproj file please checkout to Frameworks/XcodeF and run xcodegen command. And then run xcodegen command in main directory.
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 with the attached XcodeGenImpl.zip and the project.yml files. In Frameworks/XcodeF, run xcodegen, then run xcodegen in the main directory and test on a device running iOS 16 or later with the app extension and dependency enabled. Compare this with commenting out both entries; done means the generated application embeds and links the local targets without a runtime Library not loaded failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100