Grated apple keeps this spice cake moist and sweet down to the very last crumb. I like to use half granny smith apples and half fuji, but feel free to use whatever type(s) of apple you like. —CakePants
Preheat the oven to 350 degrees. Grease and flour an 8×8 pan, or line with parchment paper.
In a mixing bowl, stir together all the dry ingredients (flour, baking soda, spices, salt, and sugar). With your hands, gently squeeze out about half of the liquid from the grated apple (you won’t need the juice for the cake, so go ahead and drink it!). Add the grated apple and the remaining cake ingredients and stir until combined. Transfer the batter into the pan and bake for 35-40 minutes, or until an inserted toothpick comes out clean.
For the frosting: combine all of the ingredients and stir until smooth. Spread or pipe the frosting onto the cake once the cake has cooled.