Closed maniramezan closed 4 years ago
I will get this reviewed and merged first thing tomorrow! Just want to run through some of the tests since it looks like they have changed.
Also, I’m not up to date on SPM... do I need to advertise/list it anywhere? Thanks!
IMO it should be mentioned in Readme file as part of installation and emphasize on including bundle manually until adding resource capability is available in SwiftPM. Especially because it causes a crash if you don’t and use any of the APIs using the localization.
Haven't forgotten about you! Had a few things come up at work, so might be closer to the weekend.
No hurries, whenever you get to it, let me know if you had any questions. I’m still waiting for new Xcode11.4 beta to comes out to see if it’ll include resource changes.
any updates on this?
You can use master
branch from my fork if you need this. Just be sure to manually add the bundle. I'm going to open another PR which uses 5.3 tolls which can handle resources so this won't be necessary.
For future reference, https://github.com/maniramezan/DateTools/tree/mani_swiftpm_5_3 contains the work for using SwiftPM 5.3 tooling which supports resources. For now, that branch breaks cocoapods and Carthage integrations due to lack of support for Bundle.module
in those versions. Will wait on a few more betas to see if there'd be a fix or a recommended way to solve this issue.
Closing this in favor of https://github.com/MatthewYork/DateTools/pull/294
This PR is adding support for SwiftPM. At the moment, the tests compile, but crashes when you run due to
DateTools.bundle
not being in the final bundle. Adding resources file to swiftpm has been recently added in SE-0271, but at the time of submitting this PR, it's not included in any available Swift snapshots or Xcode11.4b1 version. When it lands in public, the tests can be fixed also in addition to addingDateTools.bundle
as a resource. This is similar to https://github.com/MatthewYork/DateTools/pull/285 PR.Just note that for using SwiftPM at the moment, developers need to add
DateTools.bundle
manually to their codebase. Might worth to also update Readme file to mention SwiftPM integration and the necessity of adding the bundle file.