I have a little strange issue which I can\'t seem to figure out, I have a simple entity with a custom NSManagedObject subclass:
@objc(EntityTest) class Entit
You can downcast your property from NSNumber to Bool type like this:
var someBoolVariable = numberValue as Bool
It works for me in this way:
self.twoFactorAuthEnabledSwitch.enabled = userProfile?.twoFactorEnabled as Bool