Fruit contains an enzyme called polyphenol oxidase or tyrosinase that reacts with oxygen. The oxidation reaction basically forms a sort of rust on the surface of fruits so it turns black.
Possible remedies:
1. Coat the fruits with sugar syrup
2. Add lemon juice on fruits.