Issues with DeviceActivityReport

6 days ago 9
ARTICLE AD BOX

Who can help me show Apple’s native Screen Time on iOS and macOS? Please reach out.
I have error message that process cannot map database but it's sometimes showing screen time in iOS sometimes not. And in MacOS it's not showing nothing.
Also I want to show it by categories and currently when it shows sometimes it shows just summary time in text like: 10min

This was a code:

import DeviceActivity import FamilyControls import Foundation import SwiftUI struct ExampleView: View { private var context: DeviceActivityReport.Context = .init( rawValue: "Total Activity" ) u/State private var filter = DeviceActivityFilter( segment: .daily( during: Calendar.current.dateInterval( of: .day, for: .now )! ), users: .all, devices: .init([.iPhone, .iPad]) ) var body: some View { VStack { DeviceActivityReport(context, filter: filter) } } }
Read Entire Article