'Unable to call Device Activity in Screen Time Api From Parent Device
Using shared authorization I am able to authorize the child's device and able to see all the installed apps on the child's mobile on the parent device. But when I am trying to call DeviceActivity nothing happens. This is how I am calling DeviceActivity
class MyDeviceActivityMonitor: DeviceActivityMonitor{
override func intervalDidStart(for activity: DeviceActivityName) {
super.intervalDidStart(for: activity)
}
override func intervalDidEnd(for activity: DeviceActivityName) {
super.intervalDidEnd(for: activity)
}
override func eventDidReachThreshold(_ event:DeviceActivityEvent.Name,activity:DeviceActivityName){
super.eventDidReachThreshold(event, activity: activity)
}
}
info.plist
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.deviceactivity.monitor-extension</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).DeviceActivityMonitorExtension</string>
</dict>
Solution 1:[1]
I am stuck in this issue too. Have you tried changing the NSExtensionPrincipalClass to the below?
<string>$(PRODUCT_MODULE_NAME).MyDeviceActivityMonitor </string>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | g0mi |