2apples, peeled, quartered, cored, quarters halved crosswise, and then sliced
Preheat the oven to 350°F. Butter or coat a 9-inch square baking pan with nonstick cooking spray. Sprinkle in a little flour; tap the side of the pan and rotate to coat the bottom and sides. Tap out the excess flour and set the pan aside.
2. To make the cake: Sift together the flour, baking powder, baking soda, and salt onto a sheet of wax paper; set aside. In an electric mixer, beat the butter briefly at medium-high speed. Add the sugar gradually along with the lemon zest and beat until very light and fluffy, about 5 minutes. Add the eggs, 1 at a time, and then the vanilla. Lower the speed slightly; add the sifted flour mixture and buttermilk alternately, beginning and ending with the flour mixture and mixing just until blended; do not overmix. Scrape the batter into the prepared pan, smoothing it with a large rubber spatula. Scatter the apple slices evenly over the batter.
3. To make the crumble topping: In a bowl, stir together the flour, walnuts, granulated and brown sugars, and spice(s). Add the melted butter, stirring with a spoon until the mixture comes together as a thick paste. If the paste is too moist and greasy, sprinkle on another tablespoon of flour. With your fingers, break this mixture into little clumps and scatter it evenly over the apples. Scatter the coconut over the top.
Bake the cake for 50 to 55 minutes, or until the top is golden and a wooden pick inserted in the center emerges clean.
Cool the cake in the pan on a wire rack until warm. Then cut into large squares and serve warm, with the ice cream.