Knead a smooth dough from 350g flour, 175g sugar, a pinch of salt and 200g butter (cold in pieces) and an egg. Then chill this dough for 30 minutes.
Grease the oven`s drip pan and dust it with flour.
Peel, quarter and core apples and cut into wedges, drizzle with lemon juice.
Roll out the dough on the drip pan and push the edges up a little.
Mix 150g butter, 250g sugar, vanilla sugar until frothy, stir in cream cheese, quark, 4 eggs, the rest of the lemon juice and custard powder. Spread the mixture on the dough and place the apples tightly on top of it like a roof tile. Sprinkle on top with almond sticks.
Bake in the preheated oven (E 200 ° convection 175 °) for 50 minutes.
Heat the jam, strain it through a sieve and spread it on the apples 10 minutes before the end of the baking time.