Let the margarine get hot in a high pan. Briefly fry the liver in it, remove it and set it aside.
Cut the onions into rings. Peel and quarter the apples, cut out the core and cut the apples into very narrow wedges.
Steam the onions and apples for 8 minutes, add a little water and put the lid on the pan. In the meantime, stir together the flour, gravy powder, sour cream and spices. Pour 300 ml of water into the pan, stir in the mixture, bring to the boil briefly, season to taste and add the liver. Let simmer for 15 minutes.