Peel and grate the apples.
Mix all the ingredients except the cocoa and beat with a mixer until combined.
Transfer 1/3 of the batter to another bowl and mix it with one or two tablespoons of cocoa.
Mix the remaining 2/3 of the batter with the grated apples.
Pour the apple batter into a greased baking tin, then swirl in the cocoa batter.
Bake at 180°C for about 40 minutes.