Post

Replies

Boosts

Views

Activity

Comment on shielding and blocking apps
create a new extension (i chose call directory extension but maybe at the time you read this there will be an extension for activity monitor) int the info pList of the extension set the NSExtensionPointIdentifier key to be com.apple.deviceactivity.monitor-extension go to the swift file that was created (will be called CallDirectoryHandler if you chose a call directory extension ) and make it implement the DeviceActivityMonitor protocol you can change the name of this class if you want set the NSExtensionPrincipalClass inside the pList to the name of the class that implementing DeviceActivityMonitor protocol add the override methods you want (the most relevant ones are: intervalDidEnd and intervalDidStart. see example at the end of the message) call the DeviceActivityCenter start monitor on you APP Not the Extension with the needed parameter (you can see that on the tutorial of this api) example overridden methods:    override func intervalDidStart(for activity: DeviceActivityName) {       super.intervalDidStart(for: activity)   }       override func intervalDidEnd(for activity: DeviceActivityName) {     super.intervalDidEnd(for: activity)   }
Topic: App & System Services SubTopic: General Tags:
Nov ’21
Comment on shielding and blocking apps
I used User Defaults.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Comment on shielding and blocking apps
create a new extension (i chose call directory extension but maybe at the time you read this there will be an extension for activity monitor) int the info pList of the extension set the NSExtensionPointIdentifier key to be com.apple.deviceactivity.monitor-extension go to the swift file that was created (will be called CallDirectoryHandler if you chose a call directory extension ) and make it implement the DeviceActivityMonitor protocol you can change the name of this class if you want set the NSExtensionPrincipalClass inside the pList to the name of the class that implementing DeviceActivityMonitor protocol add the override methods you want (the most relevant ones are: intervalDidEnd and intervalDidStart. see example at the end of the message) call the DeviceActivityCenter start monitor on you APP Not the Extension with the needed parameter (you can see that on the tutorial of this api) example overridden methods:    override func intervalDidStart(for activity: DeviceActivityName) {       super.intervalDidStart(for: activity)   }       override func intervalDidEnd(for activity: DeviceActivityName) {     super.intervalDidEnd(for: activity)   }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’21
Comment on Selection To Discourage
thank you very much! i thought that there is another way to share data between app and an app extension i guess i was wrong
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Designate principal class
did all of the above and still none of the methods on MyDeviceActivityMonitor gets called. i'm using the monitor.startMonitoring() method and nothing appends
Topic: Business & Education SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Screen time api
thank you!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21