I created a custom object field of type file and I tried to upload an image. I have tried both
[object.fields setObject:[UIImage imageNamed:@"img.png"] forKey:@"file"];
and
[object.fields setObject:UIImagePNGRepresentation([UIImage imageNamed:@"img.png"]) forKey:@"file"];
but neither works. Do anyone know how to get this work?