Heat oven to 150C/130C fan/gas 2. Line two 20cm cake tins. Put the flour, cinnamon and bicarbonate of soda in a big bowl, then stir in the sugars, making sure there are no lumps of sugar. Add the oil, eggs and apples, and beat everything together. Fold in the walnuts then divide the mixture between the tins and bake for 45 mins or until a skewer comes out clean. Allow to cool for a few mins in the tin then remove and cool completely on a wire rack.
For the icing, beat all the ingredients together then chill until the mixture is thick but spreadable. Spread half the icing on top of one cake, sandwich with the other and spread the remaining icing on top