Preheat oven to 160°C Grease an 8cm deep, 22cm (base) square cake pan. Line with baking paper, allowing a 2cm overhang at 2 opposite ends.
Using electric mixer, cream butter, sugar and vanilla until pale and creamy. Add eggs, 1 at a time, beating well after each addition. Transfer mixture to a larger bowl. Using a large metal spoon, fold flour and milk alternately into butter mixture until just combined.
Spread half the batter into prepared pan. Arrange half the apple over top. Dollop half the custard over apple. Sprinkle with coconut. Gently spoon over remaining batter to cover filling.
Top with remaining apple and custard. Swirl custard into batter using a skewer. Bake for 1 hour 20 minutes to 1 hour 30 minutes or until a skewer inserted into centre comes out clean. Cool completely in pan. Lift from pan and serve.