I'm trying to use DeviceActivityEvent.
var comps = DateComponents()
comps.month = 4
let event = DeviceActivityEvent( threshold: comps)
Tried above approaches but no good. Any help/tutorial or a sample code would be appreciated. As it's a newly launched API by Apple, So there's slim to none info provided yet.
These three frameworks are related,
Managed Settings
Family Controls
DeviceActivity
Device Activity
is about running our code without launching the app.Device Activity Event
are monitors that call extensions when the user reaches the threshold in aDevice Activity Schedule
.You can get all the help about this from the apple WWDC2021.