Peel and grate the apples. Add the sugar and the juice from half a lemon (to keep a little colour) and set aside, to release its juice.
In a larger bowl, put the wheat flour, sugar and baking powder, and mix it. Add the butter and knead the butter well in flour, with two hands, until it is incorporated into the flour and obtain a coarse dust.
Pour the beaten eggs over the dough and knead the composition until we obtain a uniform dough. Remove the dough on a work surface, on which we spread a little wheat flour. Cut the dough into two parts, from each we will spread a sheet.
Squeeze well the grated apples off the left juice, so as not to soak the dough sheet. Add the vanilla sugar and cinnamon powder to the apple.
Put the first dough sheet in the baking pan, cut the edges in surplus and with a fork prick the dough from place to place. Add the apples over the first sheet of dough. Put on top, the second sheet of dough, cut the edges that were extra, and just prick with a fork from place to place. With a kitchen brush, grease the dough with a beaten egg
Place the pan in the preheated oven at 160 degrees and bake the cake until it turns golden colour, about 35-40 minutes.