Arrange the onion, apple, and carrots into the bottom of the prepared baking dish. Brush the barbecue sauce on both sides of the chicken breasts and lay atop the vegetables. Peel the sweet potato and cut into large chunks; scatter into the baking dish. Sprinkle the cranberries over the dish.