3

I am going to develop an application for kids. That I needed is I have to lock the home button permanently for this particular application but I didn't get any solution for this.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Adarsh KC
  • 449
  • 3
  • 18
  • 1
    `There is no way on this planet an app can programmatically disable the home button. The iPhone pretty much fails to work without it` for reference : [How to enable a 'kiosk mode' programmatically in ipad?](https://stackoverflow.com/questions/15068318/how-to-enable-a-kiosk-mode-programmatically-in-ipad) – Anbu.Karthik Nov 07 '19 at 05:25
  • 1
    The user no need to open another application while using this application. The user of this application is mainly 4 - 9 years old children. This application is used for brain development and logical reasoning. – Adarsh KC Nov 07 '19 at 05:53

1 Answers1

3

For kids, there is a feature in the iPhone setting called "Guided Access" this setting lock the phone with one app. This could be helpful for you. You can mention this in your app.

You can use this API to do programmatically. It was introduced in WWDC 2017. For more information how to use API and lock in a specific way. Please check this video. For doing programmatically without any device management it has been explained at 15:40th minute.

Ravi Prakash
  • 1,078
  • 1
  • 8
  • 14
  • can we enable "Guided Access" programmatically? – Adarsh KC Nov 07 '19 at 08:21
  • 1
    @AdarshKC Yes, you can but there is a limitation on that it has to be under Mobile Device Management. You can check the apple API doc for details. – Ravi Prakash Nov 07 '19 at 08:27
  • When I search on the google it shows that there is a solution called Single app mode https://www.howtogeek.com/252670/how-to-put-an-ipad-into-kiosk-mode-restricting-it-to-a-single-app/ – Adarsh KC Nov 07 '19 at 08:40
  • 1
    @AdarshKC Yes using apple configurator but that's not an option for programmatically doing it. It's more like you wanna use one app on your shop or something. Check this https://support.apple.com/en-hk/guide/apple-configurator-2/cadf1802aed/mac It comes under device management settings. – Ravi Prakash Nov 08 '19 at 06:09
  • But using app configurator it will erase all my data in ipad – Adarsh KC Nov 08 '19 at 06:11
  • 1
    yeah, don't do that. do you any particular issue with use of "requestGuidedAccessSession". – Ravi Prakash Nov 08 '19 at 06:55
  • I have tried this but its only check if guided access is enabled or not UIAccessibility.requestGuidedAccessSession(enabled: true){ success in if success{ print("\(success)") }else{ – Adarsh KC Nov 08 '19 at 06:58
  • 1
    @AdarshKC You need to check how to use that API. If you use directly without any setup. It's gonna return false. Which is just failed to enable. I have attached one video from WWDC it explains how to use that API. You will need a "com.apple.developer.edu-assessment-mode" entitle as well. Check on 15:40th Minute. And there is a whole lot of options available to choose how much control you want. https://support.apple.com/en-us/HT204775#AAC – Ravi Prakash Nov 08 '19 at 08:04
  • I have tried many ways but it doesn't succeed the only solution for this is "Guided Access". – Adarsh KC Nov 19 '19 at 06:28
  • 1
    @AdarshKC Did you got "com.apple.developer.edu-assessment-mode" entitlement from apple? As it's described in 15:40th minute of the video. You need to check with apple for that. – Ravi Prakash Nov 20 '19 at 09:19
  • 1
    There is a sample code as well. You can check ReadMe of that. That explains how to get the entitlement. https://developer.apple.com/videos/play/wwdc2017/716/ – Ravi Prakash Nov 20 '19 at 10:11
  • I am checking on it – Adarsh KC Nov 20 '19 at 10:23