Place the flour and salt into a large bowl, rub the butter into the flour using your fingertips until the mixture resembles breadcrumbs.
Mix in the egg yolk and just enough water to bring the pastry together into a ball.
Divide the pastry into two and wrap each piece in cling film.
Rest in the fridge for 30 mins
Whilst the pastry is resting, prepare the filling. Mix the sliced apples with the coconut sugar, lemon juice and vanilla then stir in the cranberries.
Preheat the oven to 180ºC
Once the pastry has chilled, roll one half into a circle big enough to line a 20cm pie dish, it should be about the thickness of a £1 coin.
Tip the filling into the tin then roll the rest of the pastry out so it is big enough to cover the pie.
Trim off any excess pastry then brush the rim with the beaten egg and crimp the edges, or press together with a fork, to seal the pie.
Pour over the melted butter then brush with the remaining beaten egg.
Sprinkle over the coconut sugar and cut a few holes in the top of the pie to allow the steam to escape.
You can use any pastry trimmings to make decorations for the top of the pie if you like.
Bake in the oven for 50-60 mins or until the pastry is golden and the apples are tender.
Serve warm with vanilla ice-cream or yoghurt.