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.