锁定 iPhone/iPod/iPad,使其只能运行一个应用程序 [英] Lock-down iPhone/iPod/iPad so it can only run one app

查看:266
本文介绍了锁定 iPhone/iPod/iPad,使其只能运行一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望锁定"iPhone/iPod/iPad,以便用户只能运行一个应用程序(我们已在内部开发了此应用程序).我猜我们会考虑越狱,然后替换 (?) 默认的 Springboard 应用程序.

We'd like to 'lock-down' an iPhone/iPod/iPad so that the user can only run one app (we've developed this app internally). I'm guessing we'd be looking at jailbreaking, and then replacing (?) the default Springboard app.

我们可以这样做吗?如果是,怎么办?

Can we do this? If so, how?

iOS 7 现在包含一个App Lock"有效负载,作为设备配置文件的一部分.来自 Apple 文档:

iOS 7 now includes an 'App Lock' payload as part of the device configuration profile. From the Apple docs:

通过安装应用锁有效载荷,设备被锁定到单个应用程序,直到有效载荷被移除.主页按钮被禁用,设备在唤醒或重启时自动返回到指定的应用程序."

在此处阅读更多相关信息:
https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf

Read more about it here:
https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf

推荐答案

可以将 iPad 或 iPhone 置于商店演示"模式,以便禁用主页按钮和滑动到主页手势.如果您在 Apple Store 中看到运行智能标志应用程序的 iPad,那么您就会明白我的意思.

It is possible to put an iPad or iPhone into 'Store Demo' mode so that the home button and swipe to home gesture is disabled. If you have seen the iPads in the Apple Store running the smart sign apps then you will know what I mean.

使这项工作实际上非常简单,您需要做的就是从网络服务器无线安装格式正确的移动配置 plist.

It is actually pretty trivial to make this work, all you need to do is install a correctly formatted mobile config plist over the air from a web server.

要从网络提供您的配置,您只需将 iPhone 定向到包含配置文件的 URL.只需在 safari 中打开指向您的 .mobileconfig 文件的链接.如果您没有网络空间,您可以使用 Dropbox 公共文件夹 URL 或打开您的 mac 网络服务器.

To deliver your config from the web all you have to do is direct the iPhone to a url containing the profile. Just open the link to your .mobileconfig file in safari. If you don't have web space you can just use dropbox public folder URLs or switch on your mac webserver.

您也可以使用 IPCU 加载配置,但我还没有尝试过. 此配置文件不会加载到 iPhone 配置实用程序中,因为它使用 IPCU 不知道的密钥.您可以将其与您使用的任何其他企业配置文件结合使用.

It's possible that you can load the config using IPCU too but I have not tried this. This config file will not load in the iPhone Configuration Utility as it uses keys that IPCU doesn't know about. You can combine this with whatever other enterprise configuration profiles you have in play.

EDIT:@cocoanetics 指出 IPCU 不需要删除配置文件.但是请注意,要让您的设备恢复正常,您需要执行以下操作:

EDIT: @cocoanetics pointed out that IPCU is not required to remove the profile. However note that to get your device back to normal you would need to do the following:

  1. 重启
  2. 首先打开设置应用程序 - 不要打开任何其他内容,否则您将需要重新启动
  3. 设置->常规->个人资料->[您的个人资料]将其删除.
  4. 重启

你应该恢复正常.

我已经包含了一个示例 plist,它将禁用主页按钮并将您的设备锁定到应用程序中.

I have included an example plist that will disable the home button and lock your device into the app.

注意

安装此配置文件后,设备重启时启动的第一个应用将是唯一一个运行的应用,直到您再次重启设备.正如 @Cawas 所说,这完全禁用了返回主屏幕的能力(除非您的应用崩溃),包括辅助触摸.

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. As @Cawas has said this completely disables the ability to return to the home screen (unless your app crashes) including accessibility assistive touch.

请注意,安装配置文件后,您必须重新启动设备(关机、开机)才能生效.要删除配置文件,请将设备插入 IPCU 并将其删除,然后重新启动设备.一切都会恢复正常.

Note that after installing the profile you must reboot the device (power off, power on) for it to take effect. To remove the profile plug the device into IPCU and delete it then reboot the device. Everything will be back to normal.

<?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 home</string>
            <key>PayloadDisplayName</key>
            <string>Home Button Lock</string>
            <key>PayloadIdentifier</key>
            <string>com.hbkill.kiosk</string>
            <key>PayloadOrganization</key>
            <string>My Org</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.hbkill</string>
    <key>PayloadOrganization</key>
    <string>My Org</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>

您可能已经从这里开始,但我想我会在这里发布这个答案,因为我在尝试弄清楚如何做同样的事情时遇到了这个问题.

You may well have moved on from this but I thought I would post this answer here as I came across the question while I was trying to figure out how to do the same thing.

这篇关于锁定 iPhone/iPod/iPad,使其只能运行一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆