NSUserActivity's userInfo not properly transmitted from UIApplication sceneActivation call to sceneDelegate's willConnectTo method

Originator:appsolutelyfun
Number:rdar://FB9155979 Date Originated:6/10/21
Status:open Resolved:open
Product:UISceneDelegate Product Version:iPadOS
Classification:UIKit Reproducible:yes
 
The problem and steps for reproducing it:
(1) A NSUserActivity object, userActivity, is created with ["url":some local file url] as its userInfo dictionary.  
(2) UIApplication's requestSceneSessionActivation(_:userActivity:options:errorHandler:) is called with userActivity as the NSUserActivity parameter.  
(3) When the app's sceneDelegate's scene(_:willConnectTo:options:) processes that sceneActivation request, the userActivity's url-containing userInfo is missing.

What's expected: the url-containing userInfo of the userActivity parameter used for the sceneActivation request should still be present when that request is processed by the sceneDelegate's scene(_:willConnectTo:options:).

This behavior appears in the latest versions of iPadOS (14.6) and Mac Catalyst (running on the latest version of Big Sur, 11.4).

A clarification on step (3) above: when I say, "the userActivity's url-containing userInfo is missing," I simply mean that the userInfo dictionary contains no entries (and, in particular, not the url).

Also, there appears to be no problem if the userInfo dictionary has other types only; but as long as at least one of the entries in the initially created userInfo dictionary is for a local file URL, inspection of the userInfo dictionary in the sceneDelegate's willConnectTo method reveals that dictionary to have *zero* entries.

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!