01 - Preheat the oven to 350°F. Grease a 9-inch square baking pan or line with parchment paper.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, and salt.
03 - In a large bowl, cream the softened butter and granulated sugar until light and fluffy. Beat in eggs one at a time, then add vanilla extract.
04 - Mix in half of the dry ingredients, followed by the sour cream, then the remaining dry ingredients. Stir until just combined.
05 - Gently fold in the diced apples.
06 - In a small bowl, combine light brown sugar and cinnamon for the swirl.
07 - Spread half the batter evenly into the prepared pan. Sprinkle the cinnamon-sugar mixture over the batter. Top with the remaining batter, spreading gently to cover.
08 - In a bowl, blend flour, cold butter, light brown sugar, cinnamon, and salt using a fork or fingers until coarse crumbs form.
09 - Sprinkle the crumb topping evenly over the cake.
10 - Bake for 40–45 minutes, or until a toothpick inserted in the center comes out clean.
11 - Cool in the pan for at least 20 minutes before slicing and serving.