Preheat your oven to 350°F (175°C) and grease a loaf pan.
In a bowl, whisk together the flour, baking powder, baking soda, and salt.
In a separate bowl, cream the butter and sugar until light and fluffy.
Add the eggs, one at a time, mixing well after each addition.
Stir in the vanilla extract.
Gradually add the dry ingredients to the wet ingredients, mixing just until combined.
Fold in the diced apples and nuts (if using).
Pour the batter into the prepared loaf pan.
Bake for 55-60 minutes, or until a toothpick comes out clean.
Let it cool in the pan for 10 minutes before transferring to a wire rack.