Preheat your oven to 350°F.
Grease your cake pan well.
Line it with parchment paper.
This prevents sticking later.
Combine flour, sugar, and baking powder.
Add salt and cinnamon too.
Whisk everything together thoroughly.
Set this bowl aside.
Beat eggs in another bowl.
Add oil and vanilla extract.
Mix until well combined.
The mixture should be smooth.
Pour wet ingredients into dry ingredients.
Stir gently until just combined.
Don't overmix the batter.
Fold in apples and cranberries carefully.
Add walnuts if you're using them.
Pour batter into prepared pan.
Spread it evenly with spatula.
Bake for 45 to 50 minutes.
Test with a toothpick in center.
It should come out clean.
Let cake cool for 10 minutes.
Remove from pan carefully.
Cool completely on a wire rack.
Slice and enjoy your creation.