How to lock down user to Single App mode in iOS 6, Programmatically?

雨燕双飞 提交于 2019-12-03 03:55:45

The SureLock iOS app does nothing but inform the user how to do it in your system preferences.

Doing it from the app itself is only possible, if you break the rules about private frameworks. And break it hard.

I am sorry to tell you that the way you present your idea, would never be approved for the AppStore.

The accepted answer to this question is no longer correct:

Starting with iOS 7, UIKit exposes the function UIAccessibilityRequestGuidedAccessSession as public API.

I don’t know, but can very well imagine that this function existed as private API dating back to iOS 6, where the guided access feature was introduced.

Note that for this method to have any effect, the device in question must be supervised using MDM, and the ID of the app you want to use this API must be included in the device management profile deployed to it.

Hi may be I am late but I have a good news for you.

Apple provide a new feature in IOS 7 and we can lock the user to single mode without user permission(Lock and unlock mode) here is the apple documentation link

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIAccessibilityRequestGuidedAccessSession

the other way is to install the profile config profile like is

http://ipadhire.co.nz/lockdown.mobileconfig

it lock the home button of IPhone and enable single mode

For this you have to do following..

  1. access apple's private api's
  2. access apple's private framework

Apple don't encourage accessing there private api's specially when it comes for App Store, if you accessed the private api's at the time of application review on App Store they will reject the app giving you a message of "accessing a private api".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!