Instead of typing imageLiteral and let Xcode autocomplete the code, you can copy and paste this:
#imageLiteral(
P.S With the open bracket
Once you paste it after the "=" it will work
e.g
diceImageView1.image = #imageLiteral(
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: