MFMessageComposeViewController body text coloration

I'm working on a custom keyboard extension, and am currently a bit stuck on a feature. The goal is to color certain words that a user types in the preview of messaging apps - like how the emoji keyboard colors words orange that can be converted to emojis.

My general understanding is that this is done through MFMessageComposeViewController, with the target of the coloration being the body of this object. It looks like UIApperance can be used in this case, but I'm really not sure how to put it all together.

Long story short, does anyone have an idea on how to take the text of a custom keyboard like "Hello from Cupertino!" and color, for example, Hello red and Cupertino blue in the preview before the message is sent?

Thanks so much :)

MFMessageComposeViewController body text coloration
 
 
Q