Jump to content

How to block and unblock other apps using swift.

DashKat

How do I programatically restrict and unrestrict access to certain apps on iOS with swift? I have seen other apps like freedom and ourpact do this by using a profile, but I'm not sure how they do it, and there are no tutorials online.

Link to comment
Share on other sites

Link to post
Share on other sites

30 minutes ago, DashKat said:

How do I programatically restrict and unrestrict access to certain apps on iOS with swift? I have seen other apps like freedom and ourpact do this by using a profile, but I'm not sure how they do it, and there are no tutorials online.

An app can't do it directly (the programming language has zero influence on this). You need access to Apple's management API. You can then use your app to talk to the API, which in turn controlls the MDM functionality integrated into the OS.

 

Here's a starting point:

https://developerinsider.co/how-to-create-a-verified-ios-mobile-device-management-mdm-profile/

 

Here's the protocol reference:

https://developer.apple.com/business/documentation/MDM-Protocol-Reference.pdf

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×