Closed funzin closed 4 years ago
@sunshinejr Please check it when you can afford :pray:
hey @funzin, thanks for taking the time and creating a PR - I really appreciate that 💯
in terms of the error here, I understand what you're saying, though I don't really want to crash in that case - I want the framework to give a hint to the developer that it's not actually doing what they want but also not crash on release
this is a hard one because it really is an issue with Codable (types that are Encodable
shouldn't ever throw, in my opinion) and also package manager setup
also, for Carthage, you can build your framework in Debug config as well (I agree it might be troublesome if you have a lot of dependencies, though): carthage bootstrap --configuration Debug
thanks again for the PR and hope you understand 🙏
@sunshinejr Thank you for replay. It's just a suggestion, so I'll stand by your opinion:+1:
@funzin thank you!
Reference
Summary
This is sample code.
When I tried to save the value with the above code, but couldn't save it with Int64.(only iOS11, iOS12) I know that's why
JSONEncorder.encode
is failing here ref: https://github.com/sunshinejr/SwiftyUserDefaults/blob/master/Sources/Defaults.swift#L75-L80Especially in the case of
Carthage
, it is hard to notice because the framework is generated in the release build and it does not crash in theassertionFailure
. So I would like to changeassertionFailure
tofatalError
.