iPad的导览亭模式

问题描述 投票:1回答:3

我需要建立一个iPad应用程序,当用户启动时,将iPad带入kiosk模式。我翻阅了几个链接,但没有找到合适的答案。我不知道该从哪里开始。

在某处我读到,我需要在设备中加入一个移动配置文件:"

<?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>

如何做到这一点?

ios ipad
3个回答
4
投票

设备必须处于监督模式,并与MDM平台分发。使用这个功能可以启用引导模式。

UIAccessibilityRequestGuidedAccessSession()

文档上说:"使用UIAccessibilityRequest

使用UIAccessibilityRequestGuidedAccessSession()来请求将此应用锁定到Single App模式或释放。只有当设备处于被监管状态,并且该应用的捆绑标识符已经使用移动设备管理被列入白名单时,将该应用锁定到Single App模式的请求才会成功。如果您成功请求Single App模式,您有责任通过平衡此调用来释放设备。

您可以使用Meraki作为MDM平台。它是免费的https:/meraki.cisco.comroductssystems-manager。


0
投票

这是一个反复出现的问题。你不能从你的应用程序内做到这一点,至少在一个没有越狱的设备上。

的确,你可以使用iPhone配置实用程序来实现这一点,但这个解决方案只适用于企业,并且也不会允许单个应用程序的自动亭模式。

所以你最好的办法就是直接使用Guided Access。你可能想看看这个 问答 也是。


0
投票

我相信你要做的是从远程服务器加载plist,设备会问你是否信任它。如果是这样,那么应用程序应该会进入锁定模式(这就是SBStoreDemoAppLock的作用:参考这里。http:/www.zchristopoulos.com201202how-to-disable-ipad-home-button-kioskstore-demo-mode 和这里。http:/rick-hawkins.blogspot.com201201turning-ipad-into-kiosk-device.html。). 我相信@土司是错误的,它是越狱, 因为你要使用配置.

这个链接应该真正帮助你: https:/developer.apple.comlibraryiosfeaturedarticlesiPhoneConfigurationProfileRefIntroductionIntroduction.html#/apple_refdocuidTP40010206-CH1-SW53。

除此之外,如果你想尝试相对简单的配置,也可以试试苹果的配置器(在开发页面上有链接)。

关于把它放到Guided Access Mode的解决方案要注意的是,当设备重启时,它会被重置。.plist的解决方案应该保持到plist被明确删除为止。

© www.soinside.com 2019 - 2024. All rights reserved.