Ants are a frequent nuisance on fruit trees. According to the experts at the University of California, ants are likely attracted to the honeydew produced by aphids on the tree. They may also climb the tree to reach ripening fruit or sap coming from wounds in the trunk. You could apply shellac to each tree wound, but you would likely miss some, and you still wouldn’t prevent ants that are trying to reach the honeydew or fruit. By stopping ants from climbing the tree, you can keep them away from your fruit and prevent them from boring holes in the wood, which can kill the tree.
Trim branches that touch nearby trees and structures. This prevents ants from reaching the fruit by climbing over from another tree or structure and forces them to climb up the base.