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