Post

Replies

Boosts

Views

Activity

Bug in DeviceActivity
I am developing an app using DeviceActivity. let schedule = DeviceActivitySchedule( intervalStart: DateComponents(hour : 0, minute : 0, second: 1), intervalEnd: DateComponents(hour : 23, minute : 59, second: 59), repeats: true ) I found that on the second day, intervalDidStart(for: DeviceActivityName) gets called multiple times. I also tried let schedule = DeviceActivitySchedule( intervalStart: DateComponents(hour : 0, minute : 0, second: 1), intervalEnd: DateComponents(hour : 23, minute : 59, second: 59), repeats: false ) and started monitoring for the next day in the intervalDidEnd(for: DeviceActivityName) method. but , intervalDidStart(for: DeviceActivityName) still gets called multiple times. How should I resolve this issue?
0
0
196
3w
Reducing Memory Usage in DeviceActivityMonitor: Help Needed
Hi everyone, I am a beginner in Swift and I am currently using DeviceActivityMonitor to develop an app for parents to control their children's app usage time. During the development process, I found that the DeviceActivityMonitor has a 6MB memory limit in the background, and my app exceeds this limit after running for a long time. I would like to know how to reduce the memory usage of DeviceActivityMonitor in the background, or where I can check the memory usage of DeviceActivityMonitor and see which variables are consuming memory. Additionally, I want to know if a new instance of the DeviceActivityMonitor class is created every time it is called? Thank you for your help!
1
1
419
Jul ’24
ManagedSettingsStore&socialStore.shield
when i watch the video (https://developer.apple.com/videos/play/wwdc2022/110336/) i find the code let socialStore = ManagedSettingsStore(named: .social) let socialCategory = database.socialCategoryToken socialStore.shield.applicationCategories = .specific([socialCategory]) i try to find ManagedSettingsStore shield and specific([socialCategory]) i Documentation , but i failed. who can tell me wher i can find about ManagedSettingsStore shield or specific([socialCategory]) ? thanks a lot.
0
0
335
Mar ’24