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
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>
Post
Replies
Boosts
Views
Activity
I'm try to physical device always getting error on Error for Family Controls: Error Domain=FamilyControls.FamilyControlsError Code=2 "(null)"
AuthorizationCenter.shared.requestAuthorization{result in
switch result {
case .success():
print("Allow to controle App ")
break
case .failure(let error):
print("Error for Family Controls: \(error)")
}
}
My question is - how can I authorize my parents using Family Control API in order to use for example Device Activity framework and Managed Settings framework?
I'm try to physical device always getting error on
Error for Family Controls: Error Domain=FamilyControls.FamilyControlsError Code=2 "(null)"
AuthorizationCenter.shared.requestAuthorization { result in
switch result {
case .success():
break
case .failure(let error):
print("Error for Family Controls: (error)")
}