MSMessageLiveLayout message bubble disappears

I've implemented MSMessageLiveLayout, and the info and options it allows my app to provide in the transcript are a nice addition. However, it's not totally behaving as I'd hoped, and trying to figure out next step. All testing is live on devices and not Simulator.


The structure of the implementation follows the WWDC video on the topic. There's a UIView for the transcript view. To simplify things, it only sets a background color and adds a contextual UILabel so I can distinguish one message from another in the transcript. [There's a more involved layout with the real data, but I simplified it to work out these bugs.] When the live layout draws, it draws to the specified size from contentSizeThatFits. So far, so good.

Issue 1. When the message is sent via conversation.send or conversation.insert (tried both), the LiveLayout bubble disappears from the recipient's transcript even though the log shows the live layout's UIView is being initialized. It actually shrinks to nothing via an animation apparently run by Messages. BUT, if the recipient quits Messages, removes it from the app list, and then relaunches it, the message bubble displays accurately. Nothing is being done other than quitting and relaunching Messages, but that shouldn't be required for the live layout to display.


Issue 2. When the sending device from above is an iPhone (a 5S, if that matters), after conversation.send is called and the message sends, the transcript sequence (willBecomeActive, with presentationStyle of .transcript, etc) is called for each of the live layouts on seemingly endless loop. It only stops if I force the app from expanded view to compact view. [If I use conversation.insert, this does not happen, but conversation.send is so much more awesome.] If I understand, my app isn't caught in a loop; Messages is calling out to my app's live layouts without end, though I don't know why or how to prevent it.


Anyone have any suggestions for getting past this? I'm kinda stumped on what to try next, since the things that are happening seem to caused by Messages, though I'm always hesitant to assume it's anything other than my code at fault...


Thanks for any suggestions.

Replies

Issue 2 from the OP seems to be resolved with an update to iOS 11.1 beta 4. Can't swear it's cause and effect. Perhaps coincidence. But that device isn't in a continuous look upon conversation.send any longer and the only diff was the iOS update.


Issue 1 is also resolved with iOS 11.1 beta x.


But that leaves a problem. Users who don't upgrade from 11.0.x to 11.1 will continue to see the bog from Issue 1 because the app has no way to prevent the system from seeking a presentation style of .transcript. Even if the app only presents that view for 11.1, the system will just substitute a presentation style of .expanded or .compact in its place, neither of which are an acceptable alternative. Not certain of how to handle that...