NSTextAttachment class is used for embedding images into attributed strings(NSAttributedString). Supported by iOS 7.0+, masOS 10.10+, tvOS 9.0+ and watchOS 2.0+
NSTextAttachment
objects contain either anNSData
object or anFileWrapper
object, which in turn holds the contents of the attached file.