Preheat oven to 350F/180C. Line muffin tin with cupcake liners and set aside.
In a medium bowl, sift together flour, baking powder, cinnamon, and salt. Set aside.
In a standing mixer fitted with the paddle attachment, beat together butter and sugars on medium speed until light and fluffy, about 3 minutes. Scrape down the sides and bottom of the bowl as necessary. Add eggs, one at a time, beating well after each addition. Beat in vanilla extract. Reduce mixer speed to low and add half of the dry ingredients, beating just until combined. Add milk and beat until combined. Add the other half of the dry ingredients and beat slowly only until combined. Fold in apple pieces. Do not over mix—the less you mix, the lighter the cupcakes will be.
Divide batter evenly between cupcake liners, filling them about ¾ full. Bake for 15-20 minutes, until a toothpick inserted into the center comes out clean or with just a few moist crumbs. Allow pan to cool on a wire rack for 10 minutes, then remove cupcakes from pan and allow them to cool completely on a wire rack.
To make the frosting: In the bowl of an electric mixer fitted with the paddle attachment, beat butter and salt on medium speed until smooth and creamy, 2-3 minutes. Add sugar in 2 additions, beating well after each addition until smooth. Add caramel and vanilla and beat until smooth and fluffy. Beat in more sugar if needed until desired consistency (thick enough to pipe). Frost cupcakes with frosting.
Cupcakes can be kept tightly covered at room temperature for up to 3 days.