For the dough, knead together butter, sugar, salt, lemon zest, vanilla, eggs and flour. Wrap in plastic and let rest, refrigerated. For the filling, wash, peel, core and chop the apples and mix well with the remaining ingredients. Remove the dough from the refrigerator, knead quickly and roll out to a 3mm thick rectangle about 25x35 cm. Place the filling in the middle, fold the left and right edges in and fold up the dough. Brush with beaten egg and place on a parchment lined baking sheet. Place in a preheated 200°C oven, turn the temperature down to 190°C and bake for about 40 minutes.
The dough can be prepared a day ahead.