| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
This has always been this way. The initWithUser: method was a mistake 7 years ago, and still doesn't work as you'd expect, and never will. In general, it is not possible to do this in all situations. [If anyone thinks otherwise, then they're not very experienced with UNIX systems and certain filesystems.]
You need to seteuid() to the user whose defaults you want to access, do the access, then go back to being root if needed. There is a note about this in the Foundation release notes in 10.1. I'll paste it in here, but it's a little premature: in 10.0, +resetStandardUserDefaults doesn't reset all the state necessary, and so won't have the needed effect. In 10.
0, there's no way to do all the necessary flushing/clearing, as far as I know.
| References: | |
| >Re: -[NSUserDefaults initWithUser:] broken? (From: Chris Kane <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.