What are the hard, black spots appearing on the guava fruit skin?
Certified GKH Gardening Expert
This could be something calle algal leaf spot caused by Cephaleuros virescence. The spots can appear on both leaves and fruit.
There are some other possibilities. Please see this article for advice: