Preheat the Oven: Preheat your oven to 180°C (356°F).
Mix Dry Ingredients: In a large bowl, combine the flour, baking powder, and vanilla sugar.
Combine Wet Ingredients: In a separate bowl, beat together the egg yolks, sugar, softened butter, and sour cream until smooth.
Form the Dough: Gradually add the dry ingredients to the wet mixture, mixing until a soft dough forms.
Prepare the Pan: Cover a 24cm baking pan with baking paper.
Press the Dough: Press the dough evenly into the bottom of the prepared baking pan. Set aside.
Prepare the Apples:
Cook the Apples: In a large skillet, melt the butter over medium heat. Add the sliced apples and sugar, and cook until the apples are tender and caramelized, about 5-7 minutes.
Arrange the Apples: Spread the caramelized apples evenly over the dough in the baking pan.
Prepare the Cheese Mass:
Mix Ingredients: In a large bowl, beat the cream cheese until smooth. Add the sugar, egg yolks, and cornstarch, and continue to beat until well combined.
Add to Pie: Pour the cheese mixture over the apples in the baking pan, spreading it out evenly.
Bake the Pie:
First Bake: Bake in the preheated oven for about 40 minutes, or until the cheese mass is set and slightly golden.
Prepare the Meringue:
Beat Egg Whites: In a clean bowl, beat the egg whites until soft peaks form.
Add Sugar and Lemon Juice: Gradually add the sugar and lemon juice, continuing to beat until stiff peaks form.
Spread Meringue: Spread the meringue over the baked cheese layer, and sprinkle with flaked almonds.
Final Bake:
Second Bake: Return the pie to the oven and bake at 180°C (356°F) for another 20 minutes, or until the meringue is golden and crisp.