Post

Replies

Boosts

Views

Activity

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?
Apr ’23
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 = []
Apr ’23
Reply to Interact with ManagedSettingsStore from DeviceActivityMonitor
Systems Engineer, thank you for your reply! Your example is exactly what I'm doing in the project. I'm using iOS 16.3.1 on the test device. Tell me please, is there any possibility that version of: macOS, Xcode or Xcode command line tools could have impact on that behaviour? I'm 100% sure I'm using single ManagedSettingsStore across the app. Btw, could you please share the link or some info in case we using store for iOS15? I'd like to see the mechanism of its synchronisation. Thank you in advance!
Mar ’23
Reply to iOS 16 | Screen Time API | Missing Family Controls from Provisioning Profile
Hi Leo and other folks who is stack with this. You need to do next: You need to request ENTITLEMENT KEYS (com.apple.developer.family-control). You must do it only from Account Holder. Even if you Admin - you can’t do it. Wait for Apple’s approval. It could takes up to the week. You will receive an email related to Account Holder. You must do it only from Account Holder. Even if you Admin - you can’t do it. Wait for Apple’s approval. After you’ve got approval, go to the Identifiers, choose your app’s id, open it. Now you should find Additional Capabilities tab. There should be Family Controls (Distribution) - just Enable it. Create new Provisioning certificates, download, install. (Optional) To make sure everything is setup correct, you can do the dump of your new certificate before install it, but this step is not required. If you going to do that, you can check Eskimo's answer, you need to only 5th step. (Optional) It will be good to clean your Keychain with old certificate related to your app, before you install new one. Make sure you’ve added Family Controls Capability in the Xcode and you can see it in .entitlements file. Fingers crossed🤞 Now everything should work 🔥  Glory to Ukraine 🇺🇦
Jan ’23