How to hide specific apps from home screen proactively?

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.

Accepted Reply

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]
  • Hi. Is there a way to do something similar with the "shielding" feature instead of the "blocking" feature?

Add a Comment

Replies

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]
  • Hi. Is there a way to do something similar with the "shielding" feature instead of the "blocking" feature?

Add a Comment

Worked! Thank you so much @Kmart! Is is in anyway possible to do the same with websites? Aka hide instagram.com bookmark from the homescreen.

  • I tried doing:

    let mIg = WebDomain.init(domain: "www.instagram.com") let ingredients: Set = [mIg] let webContents = WebContentSettings.FilterPolicy.all(except:ingredients) store.webContent.blockedByFilter = webContents but it didn't hide the bookmark. Just blocked access to entry.

Add a Comment