failed to write value to userdefaults, all values become read-only
| Originator: | mike.le | ||
| Number: | rdar://25012017 | Date Originated: | 25 Jan 2017 |
| Status: | Open | Resolved: | |
| Product: | Developer Tool (Xcode) | Product Version: | 8.2 |
| Classification: | Other Bug | Reproducible: | Always |
UserDefaults in Swift3 does not allow user to write data, after first time failed to write data, all data becomes read-only. Steps to Reproduce: 1. Saving data to user defaults. 2. Run and write data to user defaults 3. Retrieve data from user defaults First error when running Xcode: [User Defaults] Failed to read values in CFPrefsPlistSource<0x1700f1280> (Domain: *******, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null)): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd After that, when write value to user defaults: [User Defaults] Failed to write value for key <****> in CFPrefsPlistSource<0x100d45180> (Domain: *******, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): Path not accessible, switching to read-only Happen when using Intents and IntentsUI
Comments
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!