Preheat the oven to 350°.
Sprinkle the roast with salt and pepper. In a large skillet, heat the oil over medium heat, and brown the roast on all sides.
Transfer the roast to the baking dish, coated with cooking spray. Place the onions , apples, and the garlic around the roast. sprinkle with rosemary.
Roast until a thermometer inserted into the pork reads 145° for about 45 to 55 minutes, turning the apples, garlic, and onions once.
Remove the roast from the oven, and tent it with foil. Let it stand for about 10 minutes before slicing the roast.
Serve the roast with the apple mixture.