I'd like to use screen time Api 16.0 to hide specific apps from the home screen for individuals, not family/parental. I've already written the authentication:
let center = AuthorizationCenter.shared try await center.requestAuthorization(for: .individual)
But can't figure the doc that shows how to hide/unhide a specific app such as instagram.
The closes is familyActivityPicker https://developer.apple.com/documentation/familycontrols/familyactivitypicker but that's for IOS 15.0 API & based on user's selection versus being already pre-configured. AKA, when individual screentime API access given hide all social media apps or hide instagram.
After requesting authorization using the AuthorizationCenter
, if the user approves the request with Face ID or Touch ID, you can then use ManagedSettingsStore
to hide Instagram:
let instagram = Application(bundleIdentifier: "com.burbn.instagram")
let store = ManagedSettingsStore()
store.application.blockedApplications = [instagram]