Begin by preparing your pineapple. Peel and dice the fresh pineapple into small bite-sized pieces. Set aside.
In a medium-sized saucepan, combine the granulated sugar, water, ground cinnamon, cayenne pepper, and salt. Stir the mixture over medium heat until the sugar has completely dissolved.
Once the sugar mixture is ready, add the diced pineapple to the saucepan. Gently stir to coat the pineapple evenly with the syrup.
Allow the mixture to come to a gentle boil, then lower the heat to a simmer. Cook for about 30 minutes, stirring occasionally, until the pineapple is tender and the syrup thickens.
Preheat your oven to 200°F (95°C).
Line a baking sheet with parchment paper or grease it lightly. Using a spatula, transfer the candied pineapple onto the baking sheet in a single layer, ensuring the pieces are not touching each other.
Place the baking sheet in the preheated oven and bake for about 10 minutes. This helps to dry out the candy slightly and enhance its texture.
Remove the baking sheet from the oven and allow the cowboy candy to cool completely before serving or storing.