Open AndyDentFree opened 5 months ago
Just had a great session with the Messges and Stickers team at Apple via the WWDC Labs and got an answer!
This will be tested and confirmed when have time, in July, but the quick answer is that the layout property had not been set, which defines the kind of layout being used. They were surprised that the call worked at all!
From some brief testing, setting the layout to a MSMessageTemplateLayout does improve the appearance but the most you can get is a custom bubble - this is not a presentation of our composition or play UI. That makes sense when you think about it - the composer here is basically just showing the transcript hosted inside your app.
Digging further, I think the docs are still wrong or, at best, misleading.
The message property docs say:
If your app has an iMessage app extension, you can display your iMessage app within the message compose view, just as you would in the Messages app
However, that seems likely to only work for using MSMessageLiveLayout and is expected to be similar to the case they describe:
One instance for a message in the input field (when you stage the message by calling insert(_:completionHandler:))
The documentation for setting the
message
parameter in Apple's MFMessageComposeViewController doc says:That works to enable sending a custom message, that will be properly directed to the matching iMessage extension, as seen in imUrlDataApp
However, as seen in the screenshot below, the message dialog doesn't display our custom controller's rendering. Instead there's a weird little lozenge with a copy of our icon and a cross. Tapping the cross removes our attached
message
property and reduces the message to a simple text message.