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

store cgpoint in userdefaults iOS swift