Start by preparing your pastry. Put all of the ingredients into food processor and pulse gently until they form dough.
If you don't have a food processor simply combine flour, baking powder, salt, sugar and butter in a bowl and rub in with your fingers until you reach consistency of fine breadcrumbs. Add yogurt and vanilla extract and knead in gently until dough is formed.
Divide the dough into two pieces (one only slightly larger than the other). Wrap both pieces separately in some beeswax wraps or other and place both pieces in the freezer for as long as it takes to prepare and cool the filling.
As your dough is chilling prepare the apples. Peel and core the apples and cut them into small chunks.
Sprinkle over some sugar, spices, vanilla extract (if using) and dot with pieces of butter (if using), cover and put on a medium low heat. Cook for about 10 minutes stirring occasionally just to soften apples a bit but you want them to still hold their shape.
Set apples aside and let them cool as you preheat the oven to 180C/350F/Gas Mark 4.
Prepare baking tin by lining it with some baking paper.
When the oven finished preheating, take out the larger piece of pastry from the freezer and grate it coarsely on a box grater all over the bottom of the tin. Press the pastry down with your fingers until it evenly covers bottom of the tin.
Put prepared apple filling on top of the pastry.
Take out the smaller piece of pastry from the freezer and grate it coarsely over the top of the apples.
Bake in preheated oven for approximately 1hr.
If the top of the cake starts browning too much, cover it with some foil half way through baking.
Take szarlotka out of the oven and let it cool in the tin before serving.
