Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference Swift Package target as scheme build/target #1425

Open
anestisKons opened this issue Dec 13, 2023 · 0 comments
Open

Reference Swift Package target as scheme build/target #1425

anestisKons opened this issue Dec 13, 2023 · 0 comments

Comments

@anestisKons
Copy link

Hi there,

I'm currently working on creating a scheme for a Swift package using XcodeGen, and I've run into a bit of a dilemma. The Swift package generates a target, but I'm having trouble incorporating it into the scheme through the project.yml file.

Here's a snippet of my code for better context:

.target(
    name: "UIKitComponents",
    dependencies: ["UIKitTheme"],
    resources: []
),

Currently, I can create a target(throught XcodeGen) with the path of my Swift package and then use this target when creating the scheme in project.yml. However, this results in having two targets for the same Swift package in Xcode:

  1. One under the project, which I created with XcodeGen and can be referenced in the scheme creation.
  2. Another one under the package, which is created by Xcode/Package configs.

I have two questions:

  1. Is there a way to reference the target created by package in my project.yml file when creating schemes, like the example below?
schemes:
  UIKitComponents:
    build:
      targets:
        UIKitV2/UIKitComponents: all
  1. If referencing the package/target in the project.yml file is not possible, what would be the best approach to avoid ending up with two targets for the same Swift package?

Any guidance or suggestions would be greatly appreciated. Thank you!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant