ApplicationActivity.application.localizedDisplayName always nil

When use the DeviceActivity api to create a DeviceActivityReport, all of the ApplicationActivity.application objects have a nil localizedDisplayName.

ApplicationActivity(application: ManagedSettings.Application(bundleIdentifier: Optional("com.netflix.Netflix"), token: nil, localizedDisplayName: nil), totalActivityDuration: 0.0, numberOfPickups: 0, numberOfNotifications: 1, isTrusted: true)

I see in the documentation for Application.localizedDisplayName the following:

In an extension that provides shield configurations, this property provides the app’s name. When you access this property outside that extension, the value is nil. See ShieldConfigurationDataSource in the Managed Settings UI framework for more information.

I am using the property in an extension that provides shield configurations so it should not be nil. I do see that ManagedSettings.ActivityCategory.localizedDisplayName is set properly and that in its documentation that it has the same requirement with shield configurations.

CategoryActivity(category: ManagedSettings.ActivityCategory(identifier: Optional("DH1003"), token: nil, localizedDisplayName: Optional("Entertainment")), totalActivityDuration: 0.0, applicationActivities: [DeviceActivity.DeviceActivityData.ApplicationActivity(application: ManagedSettings.Application(bundleIdentifier: Optional("com.google.ios.youtube"), token: nil, localizedDisplayName: nil), totalActivityDuration: 0.0, numberOfPickups: 0, numberOfNotifications: 1, isTrusted: true), DeviceActivity.DeviceActivityData.ApplicationActivity(application: ManagedSettings.Application(bundleIdentifier: Optional("com.microsoft.smartglass"), token: nil, localizedDisplayName: nil), totalActivityDuration: 0.0, numberOfPickups: 0, numberOfNotifications: 3, isTrusted: true)], webDomainActivities: [])

Since categories' display names are being set correctly, this seems like a bug in the beta to me. Has anyone else seen this issue?

Same issue, same thoughts.

I can get apps name in the shield extension, but can't get apps name in the report extension. Also in the report extension, I can get the name of categories, and it has the same requirement, so can't get apps name looks like a bug for me. Also in the WWDC session video, the screenshot of WorkLog demo shows screen time per app, so I think we should be able to do the same thing in our own app.

I'm using beta 3 and waiting for beta 4.

ApplicationActivity.application.localizedDisplayName always nil
 
 
Q