Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imUrlDataApp Send from App displays weird controller rendering of message #4

Open
AndyDentFree opened this issue Jun 13, 2024 · 3 comments

Comments

@AndyDentFree
Copy link
Owner

The documentation for setting the message parameter in Apple's MFMessageComposeViewController doc says:

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. To display your iMessage app, create and assign an MSMessage object to this property.

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.

Screenshot 2024-06-13 at 19 04 39

@AndyDentFree
Copy link
Owner Author

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!

@AndyDentFree
Copy link
Owner Author

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.

@AndyDentFree
Copy link
Owner Author

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:))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant