Meandering tunnels in apples, just beneath the skin and extending to the core, are usually the work of apple maggots. Small, rice-like maggots may be present, especially in apples that have dropped to the ground. The larvae move from fallen fruit to the soil to pupate. Adult flies overwinter as pupae about 2 inches (5cm) deep in the soil.
In areas where this pest is common, hang pheromone-baited sticky traps in apple trees in early summer, before fruits grow larger than your thumbnail. Newly emerged flies will be attracted to the traps rather than each other, but it is important that the traps be in place before the flies mate and lay eggs. A single female apple maggot fly can lay 300 eggs in her short, 30-day lifespan. Promptly pick up fallen apples and chop them into pieces before composting them.
Enclosing perfect green apples in clear plastic sandwich bags will protect them from apple maggots and other pests. Some apple varieties are more susceptible to apple maggot damage than others.