01 - Preheat the oven to 350°F. Grease and line an 8-inch round cake pan with parchment paper.
02 - In a large bowl, whisk together the flour, baking powder, cinnamon, nutmeg, and salt until well combined.
03 - Rub the cold butter into the flour mixture with your fingertips until it resembles coarse crumbs.
04 - Stir the granulated sugar into the butter-flour mixture until evenly distributed.
05 - In a separate bowl, whisk together the eggs, milk, and vanilla extract until smooth.
06 - Add the wet ingredients to the dry mixture and stir until just combined. Do not overmix.
07 - Gently fold the sliced apples into the batter until evenly distributed.
08 - Pour the batter into the prepared cake pan and smooth the top. Sprinkle with demerara or granulated sugar.
09 - Bake for 45–50 minutes, or until a skewer inserted into the center comes out clean and the top is golden brown.
10 - Allow to cool in the pan for 10 minutes, then transfer to a wire rack.
11 - In a saucepan, heat the milk over medium heat until just simmering. Do not boil.
12 - In a bowl, whisk together the egg yolks, sugar, cornstarch, vanilla, and salt until smooth.
13 - Slowly pour the hot milk into the egg mixture, whisking constantly to prevent curdling.
14 - Return the mixture to the saucepan and cook over low heat, stirring constantly, until the custard thickens enough to coat the back of a spoon, about 5–7 minutes. Do not let it boil.
15 - Remove from heat and serve warm with slices of apple cake.