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

Support Swift Packages #617

Closed
wants to merge 1 commit into from
Closed

Support Swift Packages #617

wants to merge 1 commit into from

Conversation

toshi0383
Copy link
Collaborator

@toshi0383 toshi0383 commented Jul 26, 2019

#606

I personally needed this feature, so implemented.
Looks like Yonas already has an implementation, so feel free to just close this one, but otherwise people can use this branch for now.

If you want me to keep going, I will clean up the dirty codes and add tests etc.👌

project spec consideration

I chose yml format to be rather simple than elegant, using XCRemoteSwiftPackageReference directly.

Sample project.yml:

name: App
targets:
  App:
    type: application
    platform: iOS
    dependencies:
      - swiftpm:
        repositoryURL: "https://github.com/tuist/xcodeproj"
        versionRequirement:
          kind: upToNextMajorVersion
          minimumVersion: 7.0.0

See: https://github.com/tuist/xcodeproj/blob/58c6acf1111b92a9acf633359a10249cf7940045/Sources/xcodeproj/Objects/SwiftPackage/XCRemoteSwiftPackageReference.swift

swiftpm process

SwiftPM's package resolving and fetching process begins when you open the generated xcodeproj with Xcode11beta.

@yonaskolb
Copy link
Owner

Thanks for the PR @toshi0383. I have indeed gone another approach, most notably separating the definition of a package from linking to it. This allows for multiple targets to use the same package. Coming back from a break so I'll open this soon

@yonaskolb
Copy link
Owner

Swift Package support has been added here #624

Closing this PR now

@yonaskolb yonaskolb closed this Aug 13, 2019
@toshi0383 toshi0383 deleted the ts-swiftpm branch August 13, 2019 13:42
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

Successfully merging this pull request may close these issues.

2 participants