Preheat your oven to 350°F (175°C) and prepare the bundt pan.
In a large bowl, whisk together the flour, sugar, baking powder, baking soda, cinnamon, nutmeg, and salt.
In another bowl, cream the softened butter until light and fluffy, then add the eggs one at a time, mixing well after each addition.
Mix in the vanilla extract until well blended.
Gradually add the dry ingredients to the butter mixture, alternating with the diced apples, mixing just until combined.
Fold in the chopped pecans if using, making sure they are evenly distributed throughout the batter.
Pour the batter into the prepared bundt pan, smoothing the top.
Bake in the preheated oven for 50-60 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cake to cool in the pan for 10-15 minutes before transferring it to a wire rack.
Once cool, dust with powdered sugar if desired and serve.