Place the butter, caster sugar, eggs, vanilla, flour and baking powder into a large bowl and mix well until smooth. Spread half the mixture into the prepared tin. Arrange half the apples over the top of the mixture, then repeat the layers. Sprinkle over the demerara sugar. 3 Bake for 45-50 mins until golden and springy to the touch. Leave to cool for 10 mins, then turn out of tin and remove paper. Cut into bars or squares.