You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, is it possible to combine the following two wrappers in some way?
public struct EmptyBoolTrue: FallbackValueProvider {
public static var defaultValue: Bool { true }
}
@OptionalCoding<BoolAsIntCoding>
@FallbackEncoding<EmptyBoolTrue>
var autoRenewWarning: Bool?
The server sends 1 and 0 for booleans and I use Bool locally. What I would like to achieve is to set a default value of 1 or true whichever is possible if the key is missing or null but it seems the above two cannot be combined because one expects Int and the other Bool. How should I proceed regarding this, is there anything similar implemented that I can use as reference?
The text was updated successfully, but these errors were encountered:
Combining wrappers is generally rough/complex. I'm going to be looking at moving at least some wrappers to Macros which should simplify things. I will re-evaluate this then :)
Hello, is it possible to combine the following two wrappers in some way?
The server sends
1
and0
for booleans and I useBool
locally. What I would like to achieve is to set a default value of1
ortrue
whichever is possible if the key is missing ornull
but it seems the above two cannot be combined because one expectsInt
and the otherBool
. How should I proceed regarding this, is there anything similar implemented that I can use as reference?The text was updated successfully, but these errors were encountered: