How to enable a 'kiosk mode' programmatically in ipad?

廉价感情. 提交于 2019-11-28 23:52:34

Zachary Christopoulos has a post on this using a "mobile configuration plist".

Once this profile is installed the first app that is launched when the device is rebooted will be the only app that will run until you reboot the device again.

Example plist from Zachary's post:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadDescription</key>
            <string>Disables the home button.</string>
            <key>PayloadDisplayName</key>
            <string>Home Button Lock</string>
            <key>PayloadIdentifier</key>
            <string>com.zchristopoulos.kiosk</string>
            <key>PayloadOrganization</key>
            <string>Zachary Christopoulos</string>
            <key>PayloadType</key>
            <string>com.apple.defaults.managed</string>
            <key>PayloadUUID</key>
            <string>B2D02E2D-BAC5-431B-8A29-4B91F71C9FC1</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>PayloadContent</key>
            <array>
                <dict>
                    <key>DefaultsDomainName</key>
                    <string>com.apple.springboard</string>
                    <key>DefaultsData</key>
                    <dict>
                    <key>SBStoreDemoAppLock</key>
                    <true/>
                    </dict>
                </dict>
            </array>
        </dict>
    </array>
    <key>PayloadDescription</key>
    <string>Disables Home Button</string>
    <key>PayloadDisplayName</key>
    <string>Home Button Lock</string>
    <key>PayloadIdentifier</key>
    <string>com.zchristopoulos.hbkill</string>
    <key>PayloadOrganization</key>
    <string>Zachary Christopoulos</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>614D1FE3-F80D-4643-AF6B-D10C4CC8737A</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
</dict>
</plist>
Jeremy1026

Without employing private frameworks or having the device jailbroken you cannot disable the home button automatically. The closest thing you can do is have your end user employ the use of Guided Access to require a triple-click of the home button to exit the application. Guided Access must first be turned on in the Settings Application under General->Accessibility.

See Also: Disable Home Button Without Rebooting Device - Stack Overflow

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