Codling moth caterpillars feed inside fruit, especially apples.
Note the brown material (frass) being pushed out from larval entry holes and the dark red discoloration about each hole
Remove flaking bark from tree trunks to stop the caterpillars making cocoons there over winter.
A band of corrugated cardboard around the trunk will stop codling moth caterpillars as they migrate down (late summer-autumn).
The band makes a good site for them to make their cocoons.
It can be removed and burnt after the fruit is harvested.
Plant Lavender underneath fruit trees to help deter codling moth.