Apple’s boss Tim Cook appears on the witness stand in the high-profile legal row with Epic Games.