The fly goes for the red apple rather than the unripe green ones on the tree. Unfortunately for the fly, the fake apple is covered with a sticky substance that traps it. Animal pests are voles, birds, and deer. Voles eat the bark of young trees in winter. According to The Home Fruit Planting, a publication of the Cornell Cooperative Extension, voles can be deterred by keeping the grass mowed around trees in the fall, not mulching, and protecting the lower trunk with a cover of quarter-inch hardware cloth.
Deer are more of a problem in spring when they eat tender new growth.
The Cooperative Extension recommends hanging a fragrant bar of soap in the tree, but garden shops sell a veritable arsenal of deer repellents that can be used on trees. They are organic, but don't need to be sprayed on the fruit because deer usually wait for apples and peaches to fall on the ground. The only drawback to these sprays is that they must be repeated, especially after a rainfall. They also are smelly, but they work pretty well. Deer also like to rub the velvet of their antlers off on trees, so the hardware cloth would seem a good move for this reason, too.