Xamarin iOS - NSUserDefaults Never Saves

This problem is caused by either not calling Synchronize() or your “key” is in the wrong position for the Set______() functions.

1
2
3
4
5
string value = "my value";
var p = NSUserDefaults.StandardUserDefaults;
p.SetString(value, "key_goes_here");
p.Synchronize();