Using Xcodegen v2.10.1 and adding a local Swift package to my project, and I want it to be a dependency for one of my targets. The following is not working for me:
name: MyApp
localPackages:
- Modules/Utilities
packages:
Pathos:
from: 0.2.0
url: https://github.com/dduan/Pathos.git
targets:
MyApp:
type: application
platform: iOS
sources:
- MyApp/Sources
- MyApp/Resources
dependencies:
- package: Utilities
configFiles:
Debug: xcconfigs/BindleWriter-Debug.xcconfig
Release: xcconfigs/BindleWriter-Release.xcconfig
And the error I get is Spec validation error: Target "MyApp" has an invalid package dependency "Utilities". If I alter the dependency on Utilities to be on Pathos instead (which is a remote package) then the project generates just fine.
Am I holding it wrong?
Hi @jsorge, currently local packages are only supported when they mirror remote packages. There is mention of that buried here https://github.com/yonaskolb/XcodeGen/blob/master/Docs/Usage.md
Additional work is required to support completely local packages
Ah that makes sense. I hadn't seen that note before. Thanks for letting me know.
Hi @yonaskolb, what kind of additional work is required to make this feature work?
Actually I tried to remove any package validation form SpecValidation.swift (that was on line 168) and removed guard statement in PBXProjGenerator.swift on line 630.
And it works for me. Except I don't have any remote package validation for now.
What should I do additionally to make a pull request for this feature?
Hi everybody
I'm kinda interested too. Are there any news about this?
I made a pull request and it would help this issue => https://github.com/yonaskolb/XcodeGen/pull/796
Great work guys. Thank you so much! Waiting for a new release :D
Hello. v2.15.0 is released and we can use local Swift Package from now by following format.
Thank you all!
...
packages:
MyLibrary:
path: Packages/MyLibrary
targets:
GennedProj:
...
dependencies:
- package: MyLibrary
Most helpful comment
Hi everybody
I'm kinda interested too. Are there any news about this?