I was able to start the device activity monitor. I was able to see the Device Activity Monitor Extension as a process, and was able to attach to it via Xcode.
Now I am trying block a specific 3rd party application, via the Shield.
I am using this piece of code for intervalDidStart :
override func intervalDidStart(for activity: DeviceActivityName) {
NSLog("Interval started for Device Activity")
let blockedApps : Set<Application> = [Application(bundleIdentifier: "com.facebook.Facebook")]
store.application.blockedApplications = blockedApps
super.intervalDidStart(for: activity)
}
I've declared store in the DeviceActivityMonitor class as follows :
let store = ManagedSettingsStore()
This is the error I see in the Console:
Error Domain=UsageTrackingErrorDomain Code=1 "Something without a application-identifier entitlement tried to manage usage budgets" UserInfo={NSLocalizedDescription=Something without a application-identifier entitlement tried to manage usage budgets}
The above use case should work right? I should be able to apply the settings inside DeviceActivityMonitorExtension?
What does the application-identifier entitlement look like? How do I use it?