Preheat the oven to 425°F.
Sprinkle the chicken, inside and out, with salt and pepper to taste. Using your hands, rub the skin with 1 tablespoon of the olive oil. Then gently rub with 2 tablespoons of the rosemary until the skin is evenly covered. Stuff the cavity with the apple. Set the chicken on a roasting rack in a baking pan, but do not place it in the oven yet.
In a large bowl, toss the potatoes, sweet potato, and garlic with the remaining 2 tablespoons olive oil and 1 tablespoon rosemary. (Use your hands for easiest mixing.) Season with additional salt and pepper and toss again.
Place the potatoes in the baking pan around the roasting rack and under the chicken. Place the garlic cloves on top of the potatoes (or they will burn and stick to the pan). Roast the chicken for 15 minutes, then reduce the oven temperature to 400°F. Continue to roast until the chicken skin is crisp, and the juices run clear when the thigh is pierced, about 1 hour 45 minutes. (The potatoes should be firm but tender. The garlic should be soft, although some cloves may be a little crunchy.)
Transfer the chicken to a carving board and let it rest for 10 minutes before carving. Remove the apple from the bird and carve it into wedges or slices. Transfer the potatoes and garlic cloves to a large bowl and set aside.
If you are making a wine gravy, remove the roasting rack from the pan and pour out half the fatty drippings that have collected in the pan. Set the pan over high heat and add the wine. Use a wooden spoon to scrape up any browned bits that may be sticking to the pan. Let the wine reduce by half and pour it into a gravy bowl.
Serve the chicken with the potatoes and garlic on the side and a slice or two of apple. Drizzle with wine gravy or pan drippings.