Mix flour and baking powder together. Mix in 200g sugar, vanilla sugar and salt. Add butter and egg. Knead everything together to form a smooth pastry dough. Cover and chill for at least 1 hour or overnight.
Peel apples, quarter, core and then finely chop. Toss with cinnamon and 2 tablespoons sugar. (Add more or less sugar depending on the sweetness of the apples).
Preheat oven to 190 C / Gas 5 and grease a baking tray.
Roll out a little more than half of the pastry dough on a lightly floured work surface. Line the bottom and edges of the baking tray.
Spread apple mixture onto the pastry dough. Roll out the remaining pastry dough and cover the apple mixture. Pinch down together at the sides, so that apple mixture is completely enclosed by the pastry dough.
Bake for 50-60 minutes in the preheated oven.
Remove tray from oven and allow to cool slightly. Cut into pieces and serve warm or cold.