pinterest / PINRemoteImage

A thread safe, performant, feature rich image fetcher
Apache License 2.0
4.01k stars 511 forks source link

URLProtocol.setProperty(_,forKey:in:) usage creates an error #606

Open terminatorover opened 3 years ago

terminatorover commented 3 years ago

The following is the error logged to the console.

 writeDBwithCachedResponse - Invalid protocol-property list - CFURLRequestRef. protoProps={
    PINRemoteImageWeakTaskKey = "<PINRemoteImageWeakTask: 0x2825b4700>";
}

Previously this method URLProtocol.setProperty(_,forKey:in:), was being passed a string for the value but now it's a PINRemoteImageWeakTask and this works but emits the error above. Perhaps, it's best to move to the previous implementation or have the PINRemoteImageWeakTask conform to the protocol that would allow it be serializable.