Save and retrieve boolean value in Userdefaults objective C

 Solution:

   If you save the boolean value in swift and retrieve in objective C then retrieve as String and convert as boolean.


      NSString *isOn = [defaults objectForKey:@"isOn"];

      

      if(isOn.boolValue == YES || isOn == nil) {


}


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift