Does it kill the tree or require cutting it down? Is every apple infested or just some on the tree? How often is spraying required to “control” the infestation? Asking as a gardener who went through similar problem in my zone.
It is not unusual for every apple on the tree to have signs of the larva in them. They are still edible if you can stomache eating fly larva but they go bad in a very short time.
They are very difficult to get under control because the pupae live in the soil over the winter. The trees have to be sprayed repeatedly and if you live in an infested area you are still likely to have a problem the following year. People put up traps to try and lure the flies away from the fruit and to trap them. The traps are important largely to keep a handle on when the flies are coming out of the ground and laying eggs on the apples.
It is very important to not let infected fruit sit on the ground because the larva quickly exit the fruit and get into the soil.
It is a very difficult problem to control and a constant battle if you live in an infested area.