I am working on an app that uses NSHTTPCookieStorage to store user data. I can't get to access the cookies inside the extension, as are saved inside Library. Thank you.
Asked
Active
Viewed 590 times
15
-
Did you figure how to do this? – polterfest Jun 23 '15 at 23:54
1 Answers
1
Cookies are not intended to be shared between applications (see NSHTTPCookieStorage).
Do you know which cookies in particular you are looking for? If you have a way of identifying the ones you want, you could copy them yourself to keychain or a shared CoreData store.
This way both your app and extension will have access to them.
Using NSHTTPCookieStorage is not a preferred way of storing user data. If you aim for simplicity and don't want CoreData or Keychain you could just use a plist. This also allows you to use NSFileProtectionComplete to provide a layer of security to the data you are storing.

kkodev
- 2,557
- 23
- 23