I have a problem when signing an AttribuedString to a Text(), the text is shown but the image in the middle if the text isn't.
var body: some View {
if #available(iOS 15.0, *) {
Text(messageString)
}
}
@available(iOS 15, *)
private extension BookingPaymentView {
var messageString: AttributedString {
return AttributedString(self.viewModel.text)
}
}
text content is provided from a external SDK and if I print the content I get this:
some text {\n NSColor = \"<UIDynamicCatalogColor: 0x600001facf50; name = Neutral>\";\n NSFont = \"<UICTFont: 0x14b410660> font-family: \\\"PublicSans-Regular\\\"; font-weight: normal; font-style: normal; font-size: 14.00pt\";\n}{\n NSAttachment = \"<NSTextAttachment: 0x6000014b9ea0>\";\n}. Learn more{\n NSColor = \"<UIDynamicCatalogColor: 0x600001facf50; name = Neutral>\";\n NSFont = \"<UICTFont: 0x14b410660> font-family: \\\"PublicSans-Regular\\\"; font-weight: normal; font-style: normal; font-size: 14.00pt\";\n}
In the app, I can see the text "some text . LearnMore" without the image in-betweeng "text" and "."