Melt the butter in a large saute pan over medium heat. Toss in the apples and stir to coat them with the butter. Add the lemon juice and the apple cider. Cook until the apples have softened and the cider has reduced by half. Transfer the mixture to a food processor and pulse into a coarse paste. Reserve.
In a large mixing bowl combine the flour, cinnamon, baking soda, nutmeg, both of the sugars and a pinch of salt. Make a well in the dry ingredients and add the pureed apples, the egg and vanilla. Stir to combine. Toss in the walnuts and raisins.
Butter and flour a loaf pan. Pour the batter into the prepared pan and put it in the preheated oven. Bake until a toothpick, inserted in the center comes out clean, about 40 to 45 minutes.
Remove the pan from the oven and let cool for 10 minutes. Remove the cake from the pan and cool completely.
Cut the cake in half equatorially and spread half of the icing on the bottom layer. Replace the top half and ice the top of the cake, leave the sides bare. Slice and serve.
Cream Cheese Icing:
Beat together all of the ingredients in a stand mixer or with a hand mixer until light and fluffy.