iMessage extension: can't prevent full size view on message selection

Originator:futuretap
Number:rdar://27480594 Date Originated:22-Jul-2016 12:02 AM
Status:Open Resolved:
Product:iOS SDK Product Version:10.0b3
Classification:Other Bug Reproducible:Always
 
My iMessage extension is more or less a picker to select an item to be sent. It doesn't make sense to view the full item in the extension because that would replicate the whole app within the extension. So when the user selects an app message I directly open the host app using openUrl. This works fine, however it still shows the expanded layout briefly and the animation looks ugly.

Here's my code:

override func willBecomeActive(with conversation: MSConversation) {
	super.willBecomeActive(with: conversation)
	
	if let url = conversation.selectedMessage?.url {
		dismiss()
		extensionContext?.open(url, completionHandler: nil)
	}
}

I dismiss the extension before opening the URL but apparently this is only executed after it is fully shown.

So I like to have a way to prevent showing the iMessage extension layout when selecting a message.


Note that it works fine if the extension is already active and the user selects a previous message. Then, willSelect(_:conversation:) is called and I can open the URL without the layout being expanded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!