At the suggestion of my wife's older aunt back east, we tried the below solution this year, and drastically lessened apple damage from apple maggots and codling moths. She claims it has worked for her for years.
Mix together 1 cup vinegar, 1 cup sugar, and 1 banana peel. put it all in a plastic gallon milk jug and add water to make it 1/3 - 1/2 full. Hang jugs without lids in each tree, more for larger trees. I use 2-3 for each tree I have. 3, for instance in a tree 15 feet tall and 20 feet in diameter.
I tied the jugs by their handles to branches 1" or larger in diameter with 1/4" rope.
I put up the jugs shortly after fruit set.
Lots of dead flies and other insects drowned in the jugs now.
We pressed apples for cider yesterday, and were amazed how few of the apples showed damage.