Apple has acknowledged a bug in its voice dictation feature that types “Trump” when an iPhone user says the word “racist”.