Post

Replies

Boosts

Views

Activity

[iOS 18 Beta 4] DeviceActivityMonitor extension is more likely to deadlock
Hi there, My app uses all the Screen Time API's with individual FamilyControls authorization. I've been using the API's for over 2 years (since they came out). In iOS 18 Beta (maybe started in Beta 3?), I've been experiencing random issues. I tracked it down to where it seems like DeviceActivityMonitor extension is more likely to deadlock in iOS 18. To reproduce: when DeviceActivityMonitorExtension.intervalDidEnd gets called, IF you call DeviceActivityCenter.startMonitoring for that SAME DeviceActivityName from the DeviceActivityMonitorExtension , the startMonitoring call deadlocks (if I pause debugger, it does not advance past DeviceActivityCenter.startMonitoring). The bug is reported in FB14664238. It also contains a sample project where you can reproduce this. I also note in the comment section that this is not the only way to encounter this problem. My application code (which is a lot more complicated) seems to deadlock on calling DeviceActivityCenter.activities. As a result, there seems to be an "overall trend" where, due to some changes, DeviceActivityMonitor extension is more likely to deadlock. The steps are not reproducible on iOS 17.6. This is built using Xcode 17.4. Thank you! 🙏
0
2
457
Aug ’24
iOS 17.4 broke something with app limits?
Update 1: Seems like app limits do work, but they don't account for time spent already in the day (only counts it since it first was scheduled? - but just guessing). This seems to be the change in behavior that is making it seem like broken. I have an app that uses individual FamilyControls / Screen Time authorization. I am still investigating but reporting ASAP. Will add feedback and more later. I am not sure what's going on, but so far: App limits generally work fine throughout the day(?) At around 9 PM they stop working if I clear ManagedSettingStore/DeviceActivityCenter (it might be unrelated to the time, but just clearing, but this is just what I know so far) I tried setting app limits from Apple's Setting app (so I could see if it's not just my app, and that system could have issues) and it crashes. The whole Settings app freezes and then crashes. (edit: after some freezing, including in the app picker, I was able to set a limit and it worked...did notice some odd behavior where 1 minute break did not work, but selecting 15 minute break did work) going to also update: FB13688616
2
0
1.3k
Mar ’24
ManagedSettingsStore.clearAllSettings() sometimes doesn't work
Hi there, just bumping on whether this problem is being looked at. My feedback says there are "no similar reports," but it has been happening since the inception of Screen Time API. This feedback has two separate sysdiagnoses: FB11888225 To clarify the problem: sometimes when calling ManagedSettingsStore.clearAllSettings(), MY apps shield is cleared but it still shows the Apple's default shield. So the end result is the app remains blocked. I would guess that Apple has code that synchronizes all the settings and as it tried to process my apps settings, it "cleared my apps settings," but failed to clear the "global" settings due to interprocess communication issues. If I am any correct, I'm sure it's tricky to solve, but maybe there can be some patches/hacks to add SOME extra reliability: ex. add timer/cron to double-check the integrity of ManagedSettingsStore. This is a daily problem for my users, and it's a scary one. Sometimes users delete the app, and the block screens remain. One of the only solutions is to restart their device. Imagine scenarios where users have an emergency, but they aren't able to resolve it. Here is one App Store 1-star review just to give a picture: "This app wrecked my phone. When 'pausing' a focus session, apps are not available. After a focus session ends, apps are not available. After deleting the app, apps are not available. Thank goodness I removed the Phone app from filtering in case I needed to call 911. This app is extremely dangerous. I am still dealing with website content being blocked. Of all things I can’t access the CaringBridge website to receive updates on my sick friend. I had to get in touch with apple support to fix the damage this app has done to my phone. I have never regretted installing an app more." As always, I'm always happy to send more data/answer questions.
0
1
528
Jan ’24
Any WWDC 2023 updates for Screen Time API's?
Can't find much right now, but maybe Apple devs can share some updates ;) Documentation: https://developer.apple.com/documentation/ManagedSettings?changes=latest_minor https://developer.apple.com/documentation/DeviceActivity?changes=latest_minor https://developer.apple.com/documentation/FamilyControls?changes=latest_minor Videos: https://developer.apple.com/wwdc23/sessions/?q=screen%20time
0
2
1.3k
Jun ’23
iOS 16.4 Beta Regression: FamilyActivityPicker inserts a big navigation bar at the top
Just doing an extra flag on FB12014830 before it releases as that theoretically is a UI regression from previous iOS versions (apps have to release UI changes to adapt). I do appreciate that we can now search apps! :) (note that FamilyActivityPicker also still has issues around freezing/crashing: FB11737092 + FB11994816, but that's technically not a regression)
0
1
593
Mar ’23
Critical bugs (and regressions) remaining after release
Hello! I've filed bugs/radar/feedback that are reproducible, with Xcode project attached, and videos. However, they haven't gotten attention (even across iOS releases). Maybe they aren't seen, so I'll try to more actively advertise them here. Recent regression starting iOS 16.1 where FamilyActivityPicker will sometimes fail to properly expand and show all applications (makes it difficult for users to select applications or know what is going on): FB11737092 Outstanding bug that likely has been there since the start of Screen Time API being released to .individual. DeviceActivityReport has some odd "concurrency" issues where it shows data for the wrong reports. If one debugs DeviceActivityReportExtension with 2+ scenes, each scene can receive data from an unrelated scene. The debugger shows multiple calls to func makeConfiguration(representing data: DeviceActivityResults<DeviceActivityData> across many threads when you'd think only one call would be necessary. If one uses only a SINGLE scene, these issues do not occur. FB11725142 Thank you for the great API and I'm excited to keep developing with it :) I also know of other bugs that I can reproduce, so if there's interest in working more closely to polishing up all the bugs, I'm always happy to work with the Apple engineers!
3
3
1.4k
Nov ’22
What can I do with ShieldActionExtension/ShieldActionDelegate?
I am trying to replicate Screen Time functionality where I open a sheet (or the app) when a user presses a primary or secondary action. However, I am confused on how to do that. What type of actions can I take from ShieldActionDelegate? What is the recommended way to do this? openURL? Making network calls? Is there some other way to communicate with host app other than network calls? I don't think I can use openURL to open the host app? I tried making network calls, but Firebase keychain/appgroup sharing of login state seems to not work (could be my own bug). See screenshot that hints that it should be possible to perform all sorts of actions:
0
2
903
Aug ’22
AuthorizationCenter requestAuthorization returns error 5
AuthorizationCenter.shared.requestAuthorization(for: .individual) returns: (lldb) po error Error Domain=FamilyControls.FamilyControlsError Code=5 "(null)" (lldb) po error.localizedDescription "The operation couldn’t be completed. (FamilyControls.FamilyControlsError error 5.)" What does this error mean? This is on iPadOS Beta 3. Was working fine in Beta 2. More generally, how can one debug such errors? FamilyControlsError exists: https://developer.apple.com/documentation/familycontrols/familycontrolserror But not 100% sure what they map to. I tried mapping them to error codes that I've dug through in the forums but didn't seem to perfectly map. Relevant Tweet: https://twitter.com/vicvijayakumar/status/1495092161821429761
6
0
2.3k
Jul ’22
Is it possible to shield websites?
The FamilyActivityPicker only allows to select applications & their categories (tested on iPad). However, the docs say: A view in which users specify applications, web domains, and categories without revealing their choices to the app. Where can I select web domains in the FamilyActivityPicker? Then, it seems like ManagedSettingsStore can only be used with tokens. It can't be used with explicitly initialized WebDomain structs. For example, managedSettingsStore.webDomains = [WebDomain(domain: "bad website")] is not possible to do? As a result, without the ability to get website tokens, it seems impossible to shield websites? However, it does seem possible to block websites with the web filter.
1
2
994
Jun ’22