I'm using NSUserDefaults to save some information so we can share between Apple Watch And iPhone. I've found that sometimes I am saving different properties at the same time which leads to issues. For example:
1. Extension is saving one object
2. While this is happening, a notification is passed to the iOS app that causes it to save a separate property.
This is pretty much happening at the same time and I'm seeing that the property modified by the extension is not getting correctly persisted in the NSUserDefaults database. Is there anything I can do to protect against this scenario?