I am learning iOS development and I have stumbled across an issue where UserDefaults doesn't seem to be consistently saving correctly.
When I open the app, it checks to see if a UserDefaults property exists, if so, it does something. Now, if I save the UserDefaults property and 'synchronize', then press stop on the simulator and then press 'play' again to re-open it, sometimes the UserDefaults value is nil.
I have yet to test this on a physical device, but has anyone had the same issue - if so, is it expected?