1

Initially, I have saved the value of 'AppleLanguages' key as 'en', and then when I tried to change the value as 'ar', but it still remains as 'en'

I tried to clear the value to clearing the entire UserDefaults by uninstalling the application from the device, but no luck

UserDefaults.standard.set(["ar"], forKey: "AppleLanguages")
UserDefaults.standard.synchronize()

I expect the result to be 'ar', but the result i get is 'en'

Tamir Abutbul
  • 7,301
  • 7
  • 25
  • 53
Vinith
  • 119
  • 1
  • 6

1 Answers1

2

Hi Use below code to reset to default

UserDefaults.standard.set(["Base"], forKey: "AppleLanguages")
UserDefaults.standard.synchronize()
Yogesh Tandel
  • 1,738
  • 1
  • 19
  • 25