Preheat oven to 450 degrees. Cut small slits in the tenderloins and place garlic slices in the slits. Heat the butter and vinegar in a small pan until butter is melted. Brush the tenderloins with the butter mixture, reserving any remaining butter mixture. Sprinkle with half the chopped rosemary. Season with salt and pepper. Sprinkle the onion over the bottom of a buttered 11x16-inch shallow baking pan. Place the tenderloins over the onion. You may cover the tenderloins and refrigerate until ready to roast.
Toss the apples with the remaining butter mixture in a bowl. Arrange around the tenderloins. Sprinkle with the sugar and remaining rosemary. Roast for 25 to 30 minutes or until the pork is cooked through.
Place tenderloins and apples in a hot serving dish and cover to keep warm. Place the baking pan over heat and pour a small amount of cider into the pan. Scrape the bottom of the pan to loosen the onions and brown bits. Pour into a saucepan with the remaining cider. Cook for 5 minutes or until reduced by about one-third. Whisk in the crème fraîche. Bring to a boil and season with salt and pepper.
Place the tenderloins on a carving board and cut into thick slices. Return to the serving dish. Pour the sauce over the apples and pork.