Mix the flour, sugar, salt, and butter until you get a crumbly mixture.
Add the ice water little by little until a smooth dough forms.
When it is ready, cover it with plastic wrap and refrigerate it.
Peel the apples, cut them in half, remove the core, and slice them.
Melt the butter in a skillet, add the sugar and cinnamon, and mix.
Add the water and vanilla extract, and once the sugar has dissolved, gradually stir in the flour.
Pour the syrup over the apples and mix everything together.
Place half of the dough on a floured countertop, roll it out with a rolling pin until even, and place it in the baking dish to form the base.
With the other half, make decorative strips.
Fill the pie, pour in the syrup, and use the strips to make the lattice top and folded edges.
Brush with egg yolk and bake at 200°C for 40-50 minutes.
Slice and serve with ice cream.
