I have a fig tree grown in a pot and it has never fruited and now it has black marks on the leaves.
Fig Tree Problems
Certified GKH Gardening Expert
The lack of fruiting and the black spots are separate issues. Forst, for the lack of fruit, this article will help:
The black spots are a fungus. Treat the tree with a fungicide and these spots will clear up. The tree may lose a few leaves, but the tree will be ok even with this leaf loss.