Post

Replies

Boosts

Views

Activity

Schedules invokes when the app in foreground | Device Activity Monitor | Screen Time
I successfully setup schedule and they works. But I recognised that, when I didn’t send the app to background e.g. the app still on the screen, in that case the events from Device Activity Monitor invokes. They invokes correctly by schedule, BUT, they invokes before I accumulated needed threshold time. I run schedules not in the past, but in future. So the issue why thresholds events invokes not that one when you start your schedules with threshold in the past. I have 2 events: events1 and event2. It seems that iOS think that my app in both of the groups which my events are monitoring. Firstly fires events1 (like my app in this group), then fires events2 (again like my app in this group as well). But if I go to home screen, the events works correctly few times, but then also started invoking in wrong order. Where could be the problem?
0
0
586
May ’23
Device Activity Event | Screen Time API features iOS 16
Hi there! In my previous question I received the answer that we can use DeviceActivityEvent for remote control with .individual auth. Here I'd like to clarify: Is there any restrictions to use remote control for .individual if we compare it with .child? Is it possible to add/set/update restrictions remotely with DeviceActivityEvent API for .individual? Thank you!
1
0
1.3k
Oct ’22
How to Prevent Apps From Being Deleted | Screen Time API
I'd like to implement prevent of deleting the app. In app I use Screen Time API with .individual type of authorisation. I know it possible do manually in iPhone's Settings: Settings > Screen Time > Content & Privacy Restrictions > iTunes & App Store Purchases > Deleting Apps and then choose Don’t Allow option. I've seen this implementation in other apps has been done programmatically. How I can do the same?
1
0
1.8k
May ’23
ManagedSettings applicationCategories to applications
I have next flow: User selects apps to discourage Then user selects apps with permanent access. To do this, the app blocks all apps, and then user selects which apps should be unblocked back. I've created two ManagedSettingsStores. At the step 1, I put apps in store 1, at the step 2 I put apps in store 2. To block all apps at step 2 I do: store.shield.applicationCategories = .all() After that I'm expecting that store.shield.applications will contain all apps that user has blocked at the step 2. I want to filter blocked apps on step 1 and step 2. But it doesn’t happen. Instead I see just one general token for all blocked apps. How I can receive Set<ApplicationToken> from ShieldSettings.ActivityCategoryPolicy<Application>?
2
1
2.5k
Mar ’23
Get Set<ApplicationToken> after shielded apps trough applicationCategories .all
To shield all app except a few, I did the next: store.shield.applicationCategories = .all(except: exceptions) After code above I can see that apps were successfully shielded. Then I need to receive all app's tokens that were shielded on the previous step. To achieve that I do the next: let applicationTokens = store.shield.applications But always receive nil! What should I do to get set of shielded apps which were blocked by applicationCategories?
2
1
1.3k
Mar ’23
Interact with ManagedSettingsStore from DeviceActivityMonitor
I want to remove shield restrictions for apps. Following the WWDC21 video, I declare ManagedSettingsStore and trying to reset restrictions: class MyDeviceActivityMonitor: DeviceActivityMonitor { let store = ManagedSettingsStore()       public override func intervalDidEnd(for activity: DeviceActivityName) {      super.intervalDidEnd(for: activity)            store.shield.applications = nil    }  } Will this string has impact on the app store.shield.applications = nil? Because now, while testing it seems that I'm dealing with two different stores. Or again it is doesn’t synced by default and let store = ManagedSettingsStore() will create store which will be different than store on which the app is relays on? Thank you!
2
0
1.9k
Mar ’23
Can we send Local Push Notifications from DeviceActivityMonitor extension?
I'm wondering if we able to send Local Push Notifications from DeviceActivityMonitor extension... If we have to use AppGroups to pass info between an app and the extension, could we post notification though UNNotificationRequest? I also tried to push data through NotificationCenter, also doesn’t work. Can we do so, or did something wrong? Should these cases that I described above work from iOS 16 and above or not? Thank you!
2
0
1.2k
Mar ’23
Schedules | iOS interpreting schedules as an ongoing or "active"
Hi! Thank you to Kmart who gave me the answer on my question regarding issue when eventDidReachThreshold triggers immediately! But, I still have a few questions, so I’m posting the new post. Could you please give answers for the next questions: How I can avoid the behaviour when system could interpreting schedules as an ongoing or "active"? I noticed that when I manually change the Date for the next day, eventDidReachThreshold doesn’t invoke. Are schedules incapsulate accumulated threshold time or the threshold time is shared between schedules? Why eventDidReachThreshold invokes even in case for the past day I didn’t open apps to accumulate threshold time? When I check spent time in iPhone settings, the Screen Time show that I spent 0 minutes for the apps which were selected for accumulating threshold time. Is it correct that the last schedule that was starting has more priority than the previous one? Can we manually set priority for starting schedules?
2
0
965
Apr ’23
Managed Settings | Screen Time API features iOS 16
Hi all! I'm thankful to Kmart for his answers related to Screen Time API features iOS 15 / iOS 16. That really helpful! Please, help me to clarify a few more things... As I read here in the comment ManagedSettings has two type of restrictions, shielding and blocking. Is blocking type of restriction available for users with individual type of auth? If the answer on the first question is "No", does that mean that individual user will be able just to skip the shielding screen and continue to use apps? If individual user can skip shielding, will it be allowed to do it with a passcode or without, if the passcode wasn't set for Screen Time in the phone settings? I'll really appreciate any help and answer! Thank you in advance!
3
0
4.3k
Jun ’23
ManagedSettingsStore is empty in DeviceActivityMonitor
I'm following the video with explanation of how to dealing with DeviceActivityMonitor extension. I'm facing the issue with empty ManagedSettingsStore when I'm trying to retrieve discouraged apps. The apps successfully where blocked on the selection step via .familyActivityPicker. The problem is that I can’t retrieve discouraged apps. I read that Model.shared won’t work in extension. To sync an app and extension we need to use AppGroups. Do we need to use AppGroups if we follow code like in the video?
3
1
986
Jan ’23