Make the apples: In a sauté pan, melt the butter over medium heat.
Add the apples, brown sugar and salt, and cook, stirring occasionally, until the sugar dissolves and the apples soften slightly, 4 to 5 minutes.
Let cool to room temperature.
Make the cake: Heat the oven to 350 degrees.
Grease a 10-inch oven-proof skillet with butter.
In the bowl of an electric mixer fitted with the paddle attachment, cream the butter and brown sugar until light and fluffy, 4 to 5 minutes.
Add the eggs one at a time, beating well after each addition, and mix to combine.
Scrape the bowl well, then beat in the vanilla.
In a medium bowl, whisk the flour, baking powder, salt, cinnamon and nutmeg to combine.
Add the flour mixture to the mixer and mix just until incorporated.
Scrape the bowl well.
With a rubber spatula, gently fold the apple mixture (including all of the caramel-like liquid in the pan) into the batter.
Mix just until incorporated.
Pour the batter into the prepared skillet and spread into an even layer.
Bake until the surface is evenly golden brown and appears set – a toothpick inserted into the center should have a few moist crumbs clinging to it, 30 to 35 minutes.
Let cool completely.
Make the frosting: In the bowl of a stand mixer fitted with a paddle attachment, whip butter on medium-high speed until very fluffy, about 8 minutes, occasionally scraping down the sides and bottom of the bowl.
Add powdered sugar, brown sugar, cinnamon, and salt, and beat on low to incorporate.
Add heavy whipping cream and vanilla extract, mixing on low until combined.
Increase mixer speed to medium-high and beat until very light and fluffy, about 5 to 6 minutes, occasionally scraping down the sides and bottom of the bowl.