Saving BackendlessEntity with boolean attribute in Swift

Thanks, Mark. I’ve been doubting my sanity.

Hi Edward,

This issue is fixed, you can get the fixed libs from github:

Please keep in mind, that you shouldn’t use Bool?, Int?, Double?, Float? in your data model classes.Foundation provides a bridge from Bool to NSNumber (as well as bridges for Int, Double, etc.), but it does not provide a bridge for Bool? , etc. That’s why it is not visible to Objective-C (Backendless SDK is implemented in Objective-C).

So, this is WRONG class:

class WrongNumerics : NSObject {
var logic : Bool?
var count : Int?
var real : Double?
var afloat : Float?
}

and here is RIGHT class:

class RightNumerics : NSObject {
var logic : Bool = false
var count : Int = 0
var real : Double = 0.0
var afloat : Float = 0.0
}

Regards,
Slava