[swift-corelibs-dev] Implementing HTTPCookieStorage
willstanton1 at yahoo.com
Mon Nov 7 21:15:27 CST 2016
Was wondering if there could be a common directory for Foundation-related files, such as NSUserDefaults in addition to cookie storage?
So maybe for cookies:
NSHomeDirectory() + "/.foundation/Cookies/shared"
And settings for an app/service:
NSHomeDirectory() + "/.foundation/Preferences/EXECUTABLE_NAME.plist"
And I’m not familiar with how Apple Foundation/CFNetwork/nsurlsessiond handles cookies… or caches things, but I think I agree with Kenny that naming symmetry would be nice if there is a per-user cookies file.
So having a /Library may be nicer, but potentially unnecessary?
NSHomeDirectory() + "/.foundation/Library/Cookies/Cookies.something"
> On Nov 7, 2016, at 5:45 PM, Tony Parker via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
> Hi Pushkar,
> Good question. If this were Darwin I guess I would say ~/Library/Application Support — but I don’t know what the best practices are on other platforms. Does anyone out there have some suggestions?
More information about the swift-corelibs-dev