Preheat the oven to 350°F (175°C) and grease a 9-inch round cake pan.
In a medium bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In a large bowl, beat sugar and butter until fluffy.
Add eggs one at a time, beating well after each addition. Stir in vanilla extract.
Gradually add dry ingredients to the wet mixture, mixing until just combined.
Gently fold in chopped apples.
For the cinnamon swirl: Mix brown sugar, cinnamon, and melted butter. Drizzle over the batter.
Use a knife to swirl the cinnamon mixture into the batter.
Bake for 35-40 minutes, until a toothpick inserted comes out clean.
Allow to cool for 10 minutes before transferring to a wire rack.
For the glaze (optional): Whisk powdered sugar, milk, and vanilla extract until smooth, and drizzle over the cooled cake.