MatthewYork / DateTools

Dates and times made easy in iOS
MIT License
7.22k stars 952 forks source link

SwiftPM 5.3 support with resource bundle and watchOS support #294

Open maniramezan opened 4 years ago

maniramezan commented 4 years ago

This is currently WIP due to Swift 5.3 being in beta. This CR includes the work for fixing the unit tests in addition to prevent app crashing due to unavailability of the bundle. This is based on the https://github.com/MatthewYork/DateTools/pull/291 PR, but if that branch deosn't get merged in by the time Xcode 12 / Swift 5.3 is released, this can be cleaned up and used instead and the other PR should be disregarded.

pontusm commented 4 years ago

Would it be possible to support watchOS as well? We are using DateTools on watchOS today, but with Cocoapods. We are planning to migrate to SPM in the future.

maniramezan commented 4 years ago

@pontusm Not much familiar with limitations of WatchOS, but can definitely look into it and enable it as part of this PR. I'm planning to clean it up and make the final version of it this week. I'll merge it into master branch on my fork and leave the PR open for the maintainer to decide if want to merge it in or when.

pontusm commented 4 years ago

That would be great! As I mentioned, we already use it on watchOS so I don't think you have to do much to support it. Probably just need to add it to the "platforms" list in the package file.

maniramezan commented 4 years ago

@pontusm It's ready for being merge into the main branch. I'm going to merge it into my fork, so feel free to use that.

atrbx5 commented 3 years ago

tried and getting error ld: warning: directory not found for option '***/Carthage/Build/iOS' ld: framework not found DateToolsSwift

maniramezan commented 3 years ago

@atrbx5 I don't know if this library supports Carthage, https://github.com/MatthewYork/DateTools/pull/184 is what I found in previous issues.

atrbx5 commented 3 years ago

ok figured out, long ago i was using cartage on the project and not all OTHER_LDFLAGS was removed so when import it with SPM it was still looking for binary works ok now

daltonclaybrook commented 3 years ago

Any update on this?

maniramezan commented 3 years ago

It is merged in my fork. Feel free to use that or fork from mine. I've only added SPM support and fixed some tests, no other changes are in this fork.