For the pastry:
For the filling:
For the Jam:
Combine the cold butter pieces with the flour, salt and sugar, and mix well, in a food processor or other mixing device.
Add the iced water, mixing in for just a few seconds to get a rough dough.
Turn the dough onto a work surface and knead by hand until it is smooth and well mixed. Wrap in plastic wrap or in a covered bowl, and leave to rest in the refrigerator.
Wash and peel the apples, cut them into small pieces and place in a bowl with water and squeezed lemon juice.
Heat the sugar, cinnamon and vanilla in a non-stick saucepan over medium-low heat until the sugar melts, then add the water and brandy, and let the caramel cook, stirring with a wooden spoon, until it forms large bubbles.
Add the butter to the caramel, stir in to let it melt, then add the apples and raisins, cooking for a few minutes until the apples have partially softened.
Remove from the heat, set aside and let the mixture cool.