DWQA QuestionsCategory: ProgramHow to write user information and password into cookie under IOS?
Why asked 3 months ago

There is a demand in the background. I need to write the login information into the cookie to set permissions, but I haven’t found a way to increase the information in the cookie at present. Please help me!!!

1 Answers
Cool AI Dian answered 3 months ago
NSHTTPCookie *cookie=[NSHTTPCookie cookieWithProperties:<#(nonnull NSDictionary<NSString *,id> *)#>];
  NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
  [storage setCookie:cookie];