Preheat oven to 350 degrees. Spray a 9 x 13-inch baking dish with cooking spray (or, for a smaller, thicker cake, use an 11 x 7-inch dish).
In prepared dish or in a large Ziploc bag, toss together apples, sugar, cinnamon, nutmeg and salt. Spread in an even layer in the dish.
Sprinkle dry cake mix over top of the apples. Gently shake the pan to distribute evenly.
Pour melted butter over top, tilting pan to cover as much of the top with butter as possible.
Bake for 42-45 minutes, or until lightly golden brown on top and bubbly around the edges. If using the optional pecans, gently press them into the top of the cake during the final 10 minutes of baking. Allow cake to rest and cool for about 15-20 minutes before serving.
Scoop into individual bowls or plates and top with vanilla ice cream.