Few things are more unsettling than biting into an apple to reveal half a worm. Even more disturbing is the fact that apple tree worms are not in fact worms, but rather, maggots. The most common types of apple tree 'worms' are larvae laid by apple maggot flies and codling moths. To prevent these worms from getting on your apple trees you must prevent the adult flies or moths from laying their eggs in the first place.
Prevent apple maggot flies from laying their eggs on your apples. Hang sticky fly traps from the branches of your apple trees beginning in late June. Dwarf apple varieties need at least two traps per tree while standard apple trees need at least four. Leave them in place until after you have harvested all of the apples from the tree.
Prevent codling moth eggs from hatching on the apple tree. A codling moth infestation is easily identified by the cocoons that the moths spin in the crevices of apple trees. If you see signs of these moths, spray your apple tree with a dormant oil spray in early spring before the leaves emerge. This will suffocate any eggs that may already be on the tree. Once your apple tree's blossoms begin to open, hang sticky traps with pheromone lures in the tree's branches (two per dwarf apple tree, four per full size apple tree) to trap adult moths before they can lay more eggs.
Remove apples as soon as they fall from the tree. They are prime targets for apple worms.