Place the butter and caramels in a microwave-safe bowl. Heat in microwave at half-power in 30-second increments until melted. Stir until smooth. Set aside to cool.
Combine the flour, brown sugar, salt, and pecans in a small bowl. Add the cooled caramel mixture and mix with a fork or your fingers until crumbs form. Set aside.
To make the cake:
Preheat oven to 350°F (175°C). Grease an 8-inch square baking pan.
Whisk together the flour, cinnamon, baking powder, and salt. Set aside.
Using an electric mixer on medium speed, beat the butter, sugar, and brown sugar until light and fluffy. Add the egg and vanilla, and mix until combined.
Reduce mixer speed to low. Add the flour mixture in three portions, alternating with two portions of milk. Mix just until combined.
Stir in the chopped apple.
Spread the batter evenly in the prepared pan. Sprinkle the topping over the top of the batter.
Bake 30 to 35 minutes, or until the cake has browned and a pick inserted into the center comes out clean.
Notes
Apples: Choose a good baking apple, such as Gala, Fuji, or Honeycrisp. You can peel it or leave the peel on, depending on your preference. Be sure to chop the apple finely so it blends evenly into the cake batter.
Caramel mixture: Melt the caramels and butter slowly, stirring frequently, until smooth. If the mixture is too warm when you add it to the crumb ingredients, the topping may turn sticky rather than crumbly. Let it cool slightly before mixing.
Crumb topping: The topping should form coarse crumbs that you can sprinkle evenly over the batter. Don’t worry if it looks a bit rustic—it’s meant to.
Baking time: Ovens can vary, and the moisture in the apples can affect baking time. Begin checking at 30 minutes and bake until a pick inserted into the center of the cake comes out clean.
Storage: Store in an airtight container at room temperature for 3 to 4 days.