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

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift