Peel and slice the onion. Wash, core, and slice the apple. De-rind the bacon and cut into 1/2 in (1.25cm) pieces. Heat the oil or butter in a frying pan over a moderate heat. Add the bacon, onion and apple, and fry, stirring occasionally, until soft (about 5 minutes). Stir in the salt, pepper and sugar.