Re: NSUserDefaults and home folder on different drive
Re: NSUserDefaults and home folder on different drive
- Subject: Re: NSUserDefaults and home folder on different drive
- From: Seth Willits <email@hidden>
- Date: Thu, 11 Dec 2014 11:22:28 -0800
> On Dec 10, 2014, at 11:05 PM, Rick C. <email@hidden> wrote:
>
> I write an NSString and NSData object to my app’s .plist and of course read it back when needed and this works fine 99% of the time. On occasion a user reports some trouble to me and I ask for the .plist and find out that this NSString/NSData object is missing. Digging deeper I find that most often the user has their home folder on a different drive (external?) than the actual app. What would be the solution to make sure these objects are written properly in this case? Thanks for the help,
Note that you simply can't "ask for the plist" anymore because it's not necessarily been written to yet with the latest changes. I don't know when it gets written to (maybe practically speaking it always is by the time you get to it) but the truly correct way to get a representation of what's in user defaults is to use $ defaults export <domain>
Just worth mentioning…
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden