Full uninstallation of app prevents NSUserDefaults from functioning until reboot or cfprefsd is restarted

Originator:ryan
Number:rdar://24217396 Date Originated:15-Jan-2016 06:43 PM
Status:Open Resolved:
Product:OS X Product Version:10.10 and 10.11
Classification:Serious Bug Reproducible:Always
 
Summary:
After the steps below are followed, NSUserDefaults will not set or read any values.

Steps to Reproduce:

1. Run the sample app at least once.
2. Close the sample app.
3. Run “defaults delete com.brittonmobile.Preferences-Test” in Terminal.
4. Delete the folder at ~/Library/Containers/com.brittonmobile.Preferences-Test
5. Re-launch the sample app.
6. Try either the set or read buttons. They should not function.
7. Close the sample app.
8. Run “killall cfprefsd” in Terminal or reboot.
9. Re-launch the sample app.
10. The set and read buttons should now function correctly.

Expected Results:
At step 6 the app should be reset to its original state and the buttons should function correctly.

Actual Results:
NSUserDefaults stops functioning.

Regression:
This occurs on both OS X 10.10.5 and OS X 10.11.2

Notes:
A sample program is attached that sets and reads a random number from NSUserDefaults.

Comments

How about OS X 10.11.3

Thx, for sharing the bug report. Do you know if it also happens on OS X 10.11.3? Also, is there any reaction from Apple you can report?

By martin.stemmle at Feb. 5, 2016, 9:04 p.m. (reply...)

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!