danthorpe / Money

Swift value types for working with money & currency
MIT License
933 stars 91 forks source link

Swift 3.2/4.0 support #79

Open AtharvaVaidya opened 7 years ago

AtharvaVaidya commented 7 years ago

Are there plans to update this library to Swift 3.2 or 4.0?

danthorpe commented 7 years ago

Hi @AtharvaVaidya - it is certainly my desire to maintain the project for Swift 3.2 & Swift 4.0. I will hopefully get to Swift 3.2 in the next week or so.

On a larger point, I'm mulling over potential changes for a v3 of the library which would accommodate initialisation from string values such as "USD 10" or "10USD" - which is currently not possible.

hdoria commented 7 years ago

+1

AtharvaVaidya commented 7 years ago

The string initialization would be a very welcome addition. I'd be glad to help implement it.

mattcorey commented 7 years ago

Swift 3.2/4.0 compatibility seems to be a more basic need - any focus on this would be appreciated!

lmcd commented 6 years ago

👍 Looking to migrate a large project.

maximkhatskevich commented 6 years ago

@danthorpe Were you able to add Swift 4 support or when do you plan to do so? Thanks!

lmcd commented 6 years ago

If I can help in any way, let me know. The build errors I'm seeing seem to relate to the use of NSDecimalNumber and lack of conformance to the Numeric protocol.

We could probably resolve these issues by migrating to the Decimal structure, which provides Numeric conformance out of the box.

danthorpe commented 6 years ago

Thanks all, working on Swift 4 now.

uzumakilord commented 6 years ago

@danthorpe Do you solve this problem with the numeric protocol? Where can I find it? I need to migrate a project. Thanks!

attheodo commented 6 years ago

@danthorpe any ETA on when a new version with Swift3.2/4-XCode9.0 will be out? We've kinda reach the point where Money is breaking our build now :(

danthorpe commented 6 years ago

@attheodo I have most of it done, will have a workable branch published tonight which will unblock you. But probably won't have a new version in CocoaPods until Sunday.

attheodo commented 6 years ago

@danthorpe thanks man. That will help a bunch!

lmcd commented 6 years ago

Thanks @danthorpe

clintonmedbery commented 6 years ago

Thanks @danthorpe! https://media.giphy.com/media/3oKHWikxKFJhjArSXm/giphy.gif

danthorpe commented 6 years ago

I've published the branch: feature/MNY-79_updates_for_xcode_9 which should hopefully unblock everyone from adopting Xcode 9. See: #84

The primary thing which is missing at the moment is full support for localised formatting, ran out of time today, will do this on Sunday. This will get released as a major version 3 as soon as possible. Please chime in on #84 with comments of breaking changes or things which you need.

OnurVar commented 6 years ago

Any updates ?

sashakid commented 6 years ago

feature/MNY-79_updates_for_xcode_9

How to perform arithmetic operations in this branch? Dividing is not working anymore:

let sum = Money(floatLiteral: sum)
return "\(sum.dividing(by: PriceService.shared.price).decimal)"

Value of type 'Money' has no member 'dividing'

clintonmedbery commented 6 years ago

Is this dead now? Haven't seen any updates despite there being progress made.

clintonmedbery commented 6 years ago

RIP

Ewg777 commented 6 years ago

@danthorpe any updates?

namchuai commented 6 years ago

well, here we are..

marbetschar commented 6 years ago

@danthorpe .... anything?

Your Money library looks awesome and it does exactly what I need in my project. But I'm a bit frightened using it, because there is a lot of silence around it for the last year or so. So it seems like it is dead - and coding my own solution, and therefore ignore all of your achievements simply feels not right.

That said, I'll happily provide help in coding to bring this awesome library back to life. So let's start rolling with Swift 4 support!

Where to start best?

marbetschar commented 6 years ago

@danthorpe I've found that the branch feature/MNY-79_updates_for_xcode_9 is working quite well in Swift v4.

Based upon that, I've created a pull request for FX which adds support for Swift v4, and another one which adds missing functionality in Money to work properly with the new FX.

Based upon this, it would be awesome to create new releases for both frameworks and take the next steps from there.

Any chance we can get that done somewhen soon?