Invalid data type for properties

Hi,
I saved my data into the table until two days ago. But now I take a error from system. [Unable to save object invalid data type for properties] You can change the property type in developer console.
Why I am getting this error?

let myhouse = House()
myhouse.isfurniture = self.isvalue(self.outlet1) // true or false
http://support.backendless.com/public/attachments/62fcb245567c510bac1af5888b6f3b4a.png</img>

By the way, my lib is last update

I don’t understand what the problem

Please post a full screenshot (no cropping) of your table schema and post the code for the House class.

Regards,
Mark

http://support.backendless.com/public/attachments/fed2e0ec0f90642c97e3c5d8e5e8053e.png</img>

func isvalue (switchobject: UISwitch) → Bool

{

    if (switchobject.on)

    {

        return true

    }

    else

    {

        return false

    }

}

let myhouse = House()

myhouse.isfurniture = self.isvalue(self.outlet1)
myhouse.iscellar = self.isvalue(self.outlet2)
myhouse.isbalcony = self.isvalue(self.outlet3)

        myhouse.isaircondition = self.isvalue(self.outlet4)

let dataStore = backendless.data.of(House.ofClass())

        dataStore.save(myhouse,
        response: { (result: AnyObject!) -> Void in
            let house = result as! House

Can I see the actual House class definition?

http://support.backendless.com/public/attachments/083b7733be7bb1e7f1362541c5ef43a1.png</img>

083b7733be7bb1e7f1362541c5ef43a1.png

Mark, What do you think about this problem ?

I think, everything is true but why am I getting this error ?

Alican,

Does the problem occur when you run it in a simulator or device? What type of simulator/device do you run it on?

Mark

This problem was happened after transferring my iPhone 5. App worked on my phone. I took this error.

After transferring to where? Please describe how we can reproduce the error. What type of device you run it on (IPhone 5, 6, 6+)?

after transferring to my iPhone 5(iOS 9.2.1). I am trying to run my application on simulator and my iPhone 5, but both of them give me this error.

Could you check if it runs on iPhone 6 simulator and gives you the same problem?

Yes, It is working on iPhone 6 simulator.

Edit : It is not working only iPhone 5 simulator and my iPhone 5

Could you try changing the type for all your “Bool” properties to NSNumber, like this:

var isfurniture: NSNumber = false

There is a known problem in iOS in how it presents Bool fields between iPhone 5 and 6. Changing them to NSNumber fixes the problem.

NSNumber fixed my problem. Thank you Mark. Do I take same this error again ?

You are welcome. Going forward please use only NSNumber for booleans. We will update the doc to make it clear.

If the error happens again, please let us know.