To make the pastry, sift the flours and icing into a mixing bowl. Rub the butter in with your fingertips or blitz in a food processor. Add the egg yolks and bring the dough together with your hands. Wrap in clingfilm and chill for at least one hour.
Preheat the oven to 180C. Coarsely grate the chilled pastry into the prepared tart tin and press it out with your thumbs, until the sides and base of the tin are covered.
Prick the base with a fork and put in the freezer for 30 minutes. Line with baking parchment, fill with baking beans and bake in the preheated oven for 10 to 15 minutes.
Thinly slice the apples and put them in a saucepan with one to two tablespoons of cold water. Cover with a tight-fitting lid and stew until very soft.
Sweeten to taste with sugar, let cool slightly, and then spoon into the blind-baked pastry case.
To make the topping, put the ground almonds, brown sugar, and cinnamon in a food processor and blitz. Add the butter and blitz again to a paste.
Take small balls of the mixture, press them between your finger and thumb to flatten, and arrange them in an overlapping tiled pattern on top of the apple layer.
Bake in the preheated oven for 40 to 50 minutes, until the topping is brown but still soft to the touch. Let cool slightly before serving.