ios - Swift3 - '[String : AnyObject]' is not convertible to '[HTTPCookiePropertyKey : Any]' -
i'm new swift , have taken on project written in swift 2.2 xcode 7.4. converting xcode 8 , swift3 , have single compiler error left. please fix this.
'[string : anyobject]' not convertible '[httpcookiepropertykey : any]'
here offending line of code.
let cookie = httpcookie(properties: dict as! [string : anyobject] as! [httpcookiepropertykey : any])
would fix it?
let cookie = httpcookie(properties: dict as! [httpcookiepropertykey : any])
anyobject
has been replaced any
in swift 3 unspecified dictionary values.
since httpcookiepropertykey
type alias of (ns)string
can cast type directly
let cookie = httpcookie(properties: dict as! [httpcookiepropertykey : any])
maybe
let cookie = httpcookie(properties: dict)
could work.
Comments
Post a Comment