Preheat your oven to 350°F (175°C) and grease a 9-inch cake pan.
In a medium bowl, mix flour, baking powder, baking soda, cinnamon, and salt.
In a large bowl, cream butter and sugar until fluffy.
Add eggs one at a time, beating well after each. Stir in vanilla.
Gradually add the flour mixture, alternating with sour cream, until combined.
Fold in the diced apples and pecans gently.
Pour the batter into the prepared pan and spread evenly.
For the topping: Mix brown sugar, flour, cinnamon, melted butter, and pecans.
Sprinkle the topping over the batter.
Bake for 50 minutes or until a toothpick inserted comes out clean.
Cool the cake for 10 minutes before transferring to a wire rack.