UserDefaults fails to save sometimes

Originator:pzabelin
Number:rdar://49809943 Date Originated:2019-04-10
Status:Duplicate of 29872976 Resolved:open
Product:iOS SDK Product Version:12.2
Classification:serious bug Reproducible:sometimes
 
UserDefaults is not persistent sometimes.

Steps to Reproduce:

https://github.com/omadahealth/UserDefaultsBug

Open Project in Xcode 10.2
Select iPhone X Simulator
Run tests by pressing Command-U or Select Product->Test in the menu
If test pass run again
Notice test failed. To restart delete the app on Simulator

Expected Results:
UserDefaults should be saved every time

Actual Results:
Sometimes UserDefaults fails to save

Version/Build:
iOS 12.2

Configuration:
Xcode 10.2

Comments

Apple Developer Relations response

Engineering has determined that your bug report is a duplicate of another issue and will be closed. The open or closed status of the original report your bug was duplicated to appears in a text box within the bug detail section of the bug reporter user interface. For security and privacy reasons, we don't provide access to the original bug yours was duped to. If you have any questions or concerns, please update your report directly at this link: https://bugreport.apple.com/.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!