bustoutsolutions / siesta

The civilized way to write REST API clients for iOS / macOS
https://bustoutsolutions.github.io/siesta/
MIT License
2.19k stars 158 forks source link

Fix SiestaUI library for Swift Package Manager #301

Closed karlshea closed 4 years ago

karlshea commented 4 years ago
pcantrell commented 4 years ago

Thanks for taking this on, @karlshea! Tested locally and it works great!

Two questions before I merge:

  1. Can we avoid duplicating the any/all implementations? Your solution is certainly preferable to making them public to all downstream libraries. Does SwiftPM support internal dependencies, i.e. shared modules exposed only to other modules in the package, and not downstream packages? IIRC it does not, but let’s double check. That failing, your solution is the best one I can see.
  2. SiestaUI can’t load its ResourceStatusOverlay.xib when it’s included via SwiftPM. I think this just isn’t possible until this proposal implemented, but do you know of any workarounds I can put in the docs other than just instructing people to copy that file into their projects if they need it?
karlshea commented 4 years ago

I'm not sure about the answers to either of those—I was using Siesta in my first iOS project so I've been learning as I go. Maybe it would be best to keep this as a PR until someone that really knows the right way to package something for Swift PM can weigh in on the best direction.

pcantrell commented 4 years ago

I think I’ll merge this so that people can at least use SwiftPM with Siesta, and patch up later (or least investigate to my satisfaction) before cutting an official release.

pcantrell commented 4 years ago

Official word from the SwiftPM maintainers themselves:

  1. There is no SwiftPM solution for this, but we can use symlinks with git. I’ll update to do that in a separate PR.
  2. Above is correct. Resource support should land in Swift 5.3.