Pour the rum over the grated apples and allow to infuse for 30 minutes.
Grease a springform cake tin and preheat the oven to 190 C / Gas 5.
Beat butter until fluffy. Stir in sugar, vanilla and eggs. Mix flour and baking powder and mix gradually into the mixture along with the cocoa, cinnamon and nuts. Fold the apples into the mixture and pour into the prepared tin. Bake in the preheated oven for about 60 minutes.