Getting Applications from DeviceActivityEvent swift

1.5k views Asked by At

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.

1

There are 1 answers

1
Asar On BEST ANSWER

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 a Device Activity Schedule.

You can get all the help about this from the apple WWDC2021.