Invalid data type for properties

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</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.


func isvalue (switchobject: UISwitch) → Bool


    if (switchobject.on)


        return true




        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 =,
        response: { (result: AnyObject!) -> Void in
            let house = result as! House

Can I see the actual House class definition?</img>


Mark, What do you think about this problem ?

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


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


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.