Preheat oven to 350 degrees
Grease bottom and 1/2 way up sides of an 8x4x2 pan or line with parchment paper
In a medium bowl add flour, spices, baking soda and powder and salt. Combine and set aside
In a mixing bowl combine sugar, shredded apple, oil and egg
Add dry mixture to wet and mix gently just until combined, batter will be lumpy
Carefully fold in nuts, if adding
Spoon batter into pan and cook for 55-60 minutes or until a toothpick inserted in center comes out clean.
Cool on rack for 10 minutes before removing and then allow to cool completely before storing in an airtight container