From fcb965eac67485798008a45a4f0ef66d1648aff8 Mon Sep 17 00:00:00 2001 From: xuty Date: Fri, 27 Mar 2020 07:40:52 +0800 Subject: [PATCH] fix cookie .secure property --- ios/Classes/MyCookieManager.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Classes/MyCookieManager.swift b/ios/Classes/MyCookieManager.swift index 5c44171f..289342a7 100755 --- a/ios/Classes/MyCookieManager.swift +++ b/ios/Classes/MyCookieManager.swift @@ -90,7 +90,9 @@ class MyCookieManager: NSObject, FlutterPlugin { if maxAge != nil { properties[.maximumAge] = String(maxAge!) } - properties[.secure] = (isSecure != nil && isSecure!) ? "TRUE" : "FALSE" + if isSecure != nil && isSecure! { + properties[.secure] = "TRUE" + } let cookie = HTTPCookie(properties: properties)! MyCookieManager.httpCookieStore!.setCookie(cookie, completionHandler: {() in