Lightly grease a cake pan with cooking spray. Set aside.
In a bowl, add flour, sugar, spices, baking soda, and salt and mix well.
In another bowl, add the egg, and oil and whisk until smooth.
Add the vanilla extract and beat well.
Slowly add the flour mixture, beating continuously until well combined.
Fold in the apple pieces.
Place mixture evenly into the prepared cakepan.
With a piece of foil, cover the pan and with a fork, poke some holes on top.
Slide the Air Fryer Basket inside and adjust the temperature to 355 °F to preheat for 5 minutes.
After preheating, arrange the cake pan into the Air Fryer Basket.
Slide the basket into Air Fryer and set the time for 45 minutes.
After 40 minutes of cooking, remove the foil from cake pan.
After cooking time is finished, remove the cake pan from Air Fryer and place onto a wire rack to cool for about 10 minutes.
Invert the cake onto wire rack to completely cool before slicing.
Cut the cake into desired-sized slices and serve.