Preheat your oven to 400°F (200°C).
Bake sweet potatoes for about 45-60 minutes, until fork-tender.
Allow the sweet potatoes to cool slightly, then cut them in half lengthwise.
Scoop out the flesh into a mixing bowl, leaving the skins intact.
In the mixing bowl, add cranberries, diced apple, brown sugar, cinnamon, butter, and salt. Mix until well combined.
Spoon the filling back into the sweet potato skins, packing it slightly.
If using, sprinkle chopped pecans on top of the filled potatoes.
Return the filled sweet potatoes to the oven and bake for an additional 20-25 minutes.
Remove from the oven and let cool for a few minutes before serving.