I am working on one project and I want to get other application usage time. apple has launched iOS 12 and provides the new feature Screen Time
. I want to know is there any way or API provided by Apple to get data from it.

- 37,241
- 25
- 195
- 267

- 894
- 10
- 24
-
After WWDC22, I guess now you can do this! https://developer.apple.com/videos/play/wwdc2022/110336/ – Hazem Jul 24 '22 at 06:57
3 Answers
No, on iOS each app runs in its own sandbox and cannot see data from other apps, even apps from the same publisher. An app can access special shared data, like photos from the album or contact data, but it is not possible for an app to directly access files written by other apps.
ScreenTime application is on another sandbox than your app. Unless apple provide API we can't access the same.
Update
Since apple have added screen time app into ios12 simulator. There could be a chance they provide the API's soon.

- 11,242
- 5
- 69
- 122
On iOS 15 Apple has added an API, see here: https://developer.apple.com/documentation/FamilyControls
FamilyControls
Authorize your app to provide parental controls on a child’s device. To authorize your parental controls app, use a shared AuthorizationCenter instance. You can authorize parental controls only on a device that is part of a Family Sharing group and signed into a child’s iCloud account.
You must add the Family Controls capability to your app.

- 3,677
- 2
- 30
- 48
This seems to provide functionality to parental control apps only. In other words, it cannot be used by other time-tracking or productivity apps at the moment.
-
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 13 '21 at 06:29