Post

Replies

Boosts

Views

Created

DeviceActivity -> Screen time API. Accessing struct information
I need to get the time of phone pickup and time of usage after the pickup and drop. DeviceActivityData.ActivitySegment -> a struct contains all these information. Where and how can i access these information?    let v = DeviceActivityData.ActivitySegment().totalActivityDuration ERROR: 'DeviceActivityData.ActivitySegment' cannot be constructed because it has no accessible initializers How do I initialise DeviceActivityData?
2
0
2.9k
Dec ’22
Running app , even though user completely closed the app
Is it possible to run the app in the background even though the user has completely closed it? I want to fetch device activity every 15 mins. Is this possible to fetch even though the app is completely closed?
Replies
3
Boosts
0
Views
1.2k
Activity
Dec ’22
Cannot preview in this file - "<filename>.appex is an unsupported extension"
I wanted to use deviceActivity target (File->New->Target). A package was created with filename "TotalActivityView". But i am getting this error while trying to preview it. ERROR: Cannot preview in this file ".appex is an unsupported extension" How do I use the deviceActivity target in my project?
Replies
0
Boosts
0
Views
1.2k
Activity
Dec ’22
DeviceActivity -> Screen time API. Accessing struct information
I need to get the time of phone pickup and time of usage after the pickup and drop. DeviceActivityData.ActivitySegment -> a struct contains all these information. Where and how can i access these information?    let v = DeviceActivityData.ActivitySegment().totalActivityDuration ERROR: 'DeviceActivityData.ActivitySegment' cannot be constructed because it has no accessible initializers How do I initialise DeviceActivityData?
Replies
2
Boosts
0
Views
2.9k
Activity
Dec ’22