Meet the expanded San Francisco font family

RSS for tag

Discuss the WWDC22 Session Meet the expanded San Francisco font family

Posts under wwdc2022-110381 tag

2 Posts
Sort by:
Post not yet marked as solved
3 Replies
928 Views
Hello, I am trying to make use of Screentime API in my app, I have issue with the DeviceActivityMonitor extension. I have schedule DeviceActivitySchedule which I set like this: let schedule = DeviceActivitySchedule( intervalStart: DateComponents(hour: 00, minute: 00), intervalEnd: DateComponents(hour: 23, minute: 59), repeats: false ) and DeviceActivityEvent which I set like this: let dateComponent = DateComponents(minute: 1) var events: [DeviceActivityEvent.Name: DeviceActivityEvent] = [ .encouraged: DeviceActivityEvent(threshold: dateComponent) ] The issue is that every time I start monitoring, by calling this piece of code from the app: do { print("Try start monitoring...") try center.startMonitoring(.daily, during: schedule, events: events) } catch { print("Error: ", error) } I catch in the extension that the event intervalDidStart is called, but in the same second I get called eventDidReachThreshold. What could be done wrong? Is event set properly? I was trying to set event with different Datecomponents (minute, hour, second), by setting different amount of time, like: let dateComponent = DateComponents(minute: 3) let dateComponent = DateComponents(second: 120) but nothing worked differently, every time, it was triggering eventDidReachThreshold right after the interval starts. If I put something unnormally high, like: let dateComponent = DateComponents(second: 120) The event eventDidReachThreshold is not triggered same time as the intervalStarts, but it is not counting time properly. Please if someone could help me, I want to be able to use events properly, with the amount of time which I set. Any help would be appreciated. Thanks in advance
Posted
by haris0092.
Last updated
.
Post not yet marked as solved
2 Replies
802 Views
Hi there, I'm presenting a FamilyActivityPicker inside of a sheet, and on some phones, the FamilyActivityPicker freezes and crashes when the user expands the "Other" category only. "Other" is the only category that exhibits this behavior, and it only does this on some phones, not in all cases. This issue is perfectly reproducible on those phones when using the FamilyActivityPicker for the "other" category only, but on those same phones it does not reproducible in the Native ScreenTime Picker in Settings → ScreenTime → App Limits → Add Limit. I don't have access to these phones as they are user reports, but any guidance here would be deeply appreciated. More broadly, there are several issues with the FamilyActivityPicker (categories expand on top of each other when multiple are opened, varying behavior with tapping rows vs tapping select bubbles depending on phone size, etc) that the Native ScreenTime Picker doesn't have. Grouping websites as a standalone category is preferable as well. Could we as developers just have access to that one?
Posted Last updated
.