Post

Replies

Boosts

Views

Activity

Reply to Screen Time | How to block/shield Safari?
Example of working solution let store = ManagedSettingsStore The code below will hide Safari's icon from home screen: let safari = Application(bundleIdentifier: "com.apple.mobilesafari") let blockedApplications: Set<Application> = [safari] store.application.blockedApplications = blockedApplications To display it back do this: store.application.blockedApplications = []
Topic: App & System Services SubTopic: General Tags:
Apr ’23
Reply to Schedules | iOS interpreting schedules as an ongoing or "active"
Kmart, I highly appreciate your quick response and provided answers for each of my questions! I'm clear with 2nd, 3rd, 4th and 5th. Let me clarify the 1st one please: In order to exclude device usage from the beginning of the day, use the hour/minute/second components of Date.now as the start components of your schedule. If you are trying start a repeating schedule from 12:00am to 11:59pm, you might need to use two different schedules: a non-repeating schedule for the first "partial" day and then when you get the intervalDidEnd callback for that first "partial" day, you can then start monitoring your actual repeating schedule for 12:00am to 11:59pm. For creating schedules from the beginning of the day I do so: let mondaySchedule = DeviceActivitySchedule( intervalStart: DateComponents(hour: 0, minute: 0), intervalEnd: DateComponents(hour: 23, minute: 59), repeats: true ) I'm trying to reach a vice versa implementation: I'd like to create a repeatable schedule, let say for each Monday, and this schedule has to invoke eventDidReachThreshold. On top of it, I'd like to create another one "partial" repeatable schedule, let say on Monday from 2pm to 4pm, this schedule hasn't invoke eventDidReachThreshold. So, my question is: Is eventDidReachThreshold has to work properly, in case it was programmed for the whole repeatable day schedule? And what if I'd like to create the same schedules for Tuesday (both, for whole day and "partial" and both are repeatable), will it have negative impact on Monday's schedules and for the eventDidReachThreshold event?
Topic: App & System Services SubTopic: General Tags:
Apr ’23