How to use Screen Time API

Hi guys, I am trying to build an app that blocks access to a set of apps defined by a user. Pretty typical app blocking functionality, but I can't find any info about the Screen Time API. I've narrowed it down to DeviceActivity and MangedSetting frameworks but am unsure of which to use. Also, is there a way to get a list of the installed apps on a user's device, or will I have to manually set that?

How to use Screen Time API
 
 
Q