How can I store a GIF image fetched from HTTP request in Core Data? I already store my still images with UIImagePNGRepresentation as NSData in a Binary data attribute, but I have how to proceed with a gif?
Edit: What I've done so far is getting the data from the request, then storing it in the BinaryData using UIImagePNGRepresentation. But when I try to create a UIImage with SwiftyGif, an error message shows up saying Could not determine delay times for GIF
. So I guess the PNG representation mess with the frames of the GIF.
I also tried to directly store the data from the http request but then the UIView throw me this error: Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN