We are having the same issue with UserDefaults and iOS10. One out of X times the app is opened user defaults returns nil. If the app is killed and opened again, the same user defaults returns the correct value, so the contents are not being deleted, they are just returned as nil.
We have tried to check if 'isProtectedDataAvailable', before checking User Defaults, but we have proved that the mehod returns 'true' even when user defaults is returning nil.
This is very inconvenient as we can't really trust the contens of UserDefaults anymore. We were using that storage to detect new installations, and the behaviour of the app will change based on that flag.
We are able to reproduce this issue running a sample project on a device over and over again. During the first run, we will store a flag in User defaults and we will automatically open and close the app until something fails. After a few iterations (~250), user defaults returns nil, but next time the app is opened it will work fine. We have opened a bug report for this issue but we haven't heard anything back yet, I will recomend you to open a bug report with details of the issue that you are seeing.