Preparing the Fruit Filling: Preheat oven to 350°F (175°C) and lightly grease a 9x9-inch baking dish. In a large bowl, combine sliced apples, cranberries, sugar, cinnamon, nutmeg, lemon juice, vanilla, and flour. Toss gently to coat. Spread the fruit mixture evenly in the prepared baking dish.
Making the Oatmeal Topping: In a medium bowl, combine oats, flour, brown sugar, cinnamon, and salt. Cut in cold butter using a pastry cutter or fingers until mixture resembles coarse crumbs. Stir in chopped nuts if using. Sprinkle topping evenly over fruit filling.
Baking: Bake in preheated oven for 40–45 minutes, until fruit is bubbly and topping is golden brown. Let cool slightly before serving.