Is it possible to compare to PFFiles
?
I am trying to check whether a downloaded PFFile
:
let imageFile = object["groupImage"] as PFFile
is equal to a mock data created by me like this:
let imageData = UIImagePNGRepresentation(UIImage(named: "dot.png")!)
uploadMock = PFFile(name: "mock", data: imageData!)
Now it happens when I call the comparison, it will not work.
if (mock?.isEqual(image))!{
print(true)
} else{
print(false)
}
will always give false, even though the images are the same. It seems like it would be necessary, to download the image before. I tried to work around with checking the filename (it worked used to work until I transferred to another database).
Any ideas?