How can I programmatically enable Guided Access (Kiosk mode) on an iPhone?

后端 未结 5 1966
慢半拍i
慢半拍i 2020-11-30 01:18

Question

How do I automate Guided Access mode on an iPhone? I will need to automate the enabling and removal of this feature

Backgr

5条回答
  •  误落风尘
    2020-11-30 02:06

    You can enter and exit guided access mode from within your app. However, to do so the device has to be supervised, and have an MDM profile installed that has the app's bundle ID in the list of applications that can request guided access mode (the key is autonomousSingleAppModePermittedAppIDs.

    Once that is done, to enter guided access you do this:

    UIAccessibility.requestGuidedAccessSession(true){
        success in
        print("Request guided access success \(success)")
    }
    

提交回复
热议问题