-1

I'm programing an app which requires user registration and after registration finished server send token as an authentication key.

I want to get UIWebView cookies and save it as file so I could reuse it later. How would I do that?

I'm using Xcode latest and coding in Swift.

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
madman
  • 319
  • 2
  • 6
  • 19

1 Answers1

1

It sounds like you just need to know where to look.

And the technology you're looking for is [NSHTTPCookieStorage sharedHTTPCookieStorage].

If your app has cookies that are saved off automatically, you shouldn't have to worry about saving them to some separate file for reuse later, unless the cookie is set to expire quickly (in which case it's no use to restore them for later use, anyways). Just rely upon your iOS app's cookie storage.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215