i'm trying to shield and block apps on child device.
i managed to block apps by creating a variable blockedApps : Set = Set() that contains a list of applications like Application(bundleIdentifier: "com.apple.calculator") inside the intervalDidStart on my DeviceActivityMonitor extension
now i'm trying to shield an app using the same extension and nothing happens. for this i used this code inside intervalDidStart:
let calculatorApp = Application(bundleIdentifier: "com.apple.calculator") var blockedApps : Set = Set() guard let token = calculatorApp.token else { return } blockedApps = [token] store.shield.applications = blockedApps
and i cant tell what is the reason for this not working
- is there a token issue that is nil?
- does shielding requires a different app extension?
- does my app extension requires some additional configuration maybe a different NSExtensionPointIdentifier?