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

Import Swift Package in iOS #143

Open
gotev opened this issue Mar 13, 2024 · 0 comments
Open

Import Swift Package in iOS #143

gotev opened this issue Mar 13, 2024 · 0 comments

Comments

@gotev
Copy link

gotev commented Mar 13, 2024

Hi and thank you for this library!

Wanted to test it out in an actual iOS project, but when I tried to import it the usual SPM way from Xcode, I'm getting this:
Screenshot 2024-03-13 at 12 57 07

and that's because to be able to import the library, SPM needs Package.swift and all the Swift package contents to be in the root of the repository. Being this a monorepo, one possible way to solve this is:

  • create a new branch (e.g. ios) and switch to it
  • delete all the contents from the new branch
  • copy all the contents from swift folder from main branch: https://github.com/material-foundation/material-color-utilities/tree/main/swift in the ios branch root
  • commit and push to the ios branch
  • tag the ios branch
  • define a CI workflow to be started on main branch when you want to perform an iOS release, which clones the ios branch in a separate folder, cleans its content, copies over all the contents from the swift folder and then commits, pushes and tags (.e.g 1.0.0-ios).

In that way it will be possible to import the SPM package in Xcode and other SPM packages by specifying the git repo and the ios tag.

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