With the rack in the middle position, preheat the oven to 350°F (180°C).
In a small pot, bring all of the ingredients to a boil while whisking. Simmer over medium heat for 5 minutes. Remove from the heat and set aside.
Place the apples in an 8-inch (20 cm) square glass baking dish. Set aside.
In a bowl, combine the flour and baking powder.
In another bowl, whisk together the sugar, butter and egg with an electric mixer for 3 minutes. With the machine on low speed, whisk in the dry ingredients alternating with the milk. Pour the batter over the apples and drizzle with the sauce.
Bake for 45 minutes or until a toothpick inserted in the centre of the cake comes out clean. Let cool on a wire rack.