Onion and Apple Tart

2 tablespoons olive oil
2 medium onions, sliced
2 red apples (such as Braeburn or Gala), cut into small pieces
kosher salt and black pepper
2 sheets frozen puff pastry (from a 17.3-ounce package), thawed
1/2 cup creme fraiche or sour cream


Heat oven to 400 F. Heat the oil in a large skillet over medium heat. Add the onions and cook, stirring occasionally, until soft and golden brown, 12 to 15 minutes. Stir in the apples, 1/2 teaspoon salt, and 1/4 teaspoon pepper and cook until just tender, 2 minutes.
Place each sheet of pastry on a parchment-lined baking sheet and prick all over with a fork. Spread with the cr?me fra?che, leaving a 1/2-inch border. Top with the onion mixture and bake until the pastry is crisp and browned, 30 to 35 minutes. Cut into pieces before serving.