Send Custom Interactive Layout in iMessage Extension

Hi, I am integrating iMessage app where I have audio which I want to send as Message. But My requirement is to send a custom layout with play button on it and by tapping on it I can play/pause audio. Also On tapping on sent message view presentation style changes to expanded while I want to not have any presentation change. I just want to tap on message to play audio, nothing else.

recently I tried to make a custom layout and then by taking its screenshot I sent it as image, but issue is I cant make this view interqctive. I can play audio on tap of message but I also want to update the layout of the selected message.

func sendCustomViewMessage(url:URL) { let customView = MessageView(frame: CGRect(x: 0, y: 0, width: 150, height: 50)) //CustomView(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) // Initialize your custom view customView.audioURL = url let customViewImage = imageFromView(view: customView) // Convert custom view to UIImage

    let layout = MSMessageTemplateLayout()
    layout.image = customViewImage // Set the image of the message layout
    layout.mediaFileURL = url
    layout.caption = "Firt Message"
    
    let message = MSMessage()
    message.layout = layout
    message.url = url
    
    self.activeConversation?.insert(message, completionHandler: nil)
}

I am searching since days about this but I couldn't get any appropriate solution, can anyone help me on this?

Send Custom Interactive Layout in iMessage Extension
 
 
Q