锁定 iPhone/iPod/iPad,使其只能运行一个应用程序

发布于 2024-10-17 14:18:49 字数 572 浏览 5 评论 0原文

我们想“锁定”iPhone/iPod/iPad,以便用户只能运行一个应用程序(我们内部开发了这个应用程序)。我猜我们会考虑越狱,然后替换(?)默认的 Springboard 应用程序。

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


编辑:iOS 7 现在包含“应用程序锁定”负载作为设备配置文件的一部分。来自苹果文档:

“通过安装应用程序锁定有效负载,设备将被锁定到单个应用程序,直到删除有效负载为止。主页按钮被禁用,设备在唤醒或重新启动时自动返回到指定的应用程序。”< /em>

在这里阅读更多相关信息:
https://developer.apple.com/business/documentation/Configuration-简介-参考.pdf

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?


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

"By installing an app lock payload, the device is locked to a single application until the payload is removed. The home button is disabled, and the device returns to the specified application automatically upon wake or reboot."

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

妥活 2024-10-24 14:18:49

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

完成这项工作实际上非常简单,您所需要做的就是从 Web 服务器通过无线方式安装格式正确的移动配置 plist。

要从网络传递您的配置,您只需将 iPhone 定向到包含配置文件的 URL。只需在 safari 中打开 .mobileconfig 文件的链接即可。如果您没有网络空间,您可以仅使用 dropbox 公用文件夹 URL 或打开您的 Mac 网络服务器。

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

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

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

你应该恢复正常。

我提供了一个示例 plist,它将禁用主页按钮并将您的设备锁定到应用程序中。

注意

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

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

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

您很可能已经不再这样做,但我想我应该在这里发布这个答案,因为我在试图弄清楚如何做同样的事情时遇到了这个问题。

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.

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.

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.

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 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. Reboot
  2. Open the settings app FIRST - don't open anything else or you will need to reboot again
  3. Settings->General->Profiles->[your profile] remove it.
  4. Reboot

you should be back to normal.

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

BEWARE

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.

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.

爱你是孤单的心事 2024-10-24 14:18:49

这是 iOS 6 的一项功能,无需黑客尝试即可使用。这称为“引导访问”。我的小教程是这里

编辑:如果设备的电池在受限用户手中时耗尽,用户可以重新加载设备,并且设备将在没有引导访问的情况下重新启动。但是,如果您选择对设备使用密码,那么这应该不成问题。

This is a feature of iOS 6 that can be used without hacky attempts. It's called 'guided access'. I small tutorial is here.

EDIT: In case the device's battery runs empty while it's in the hands of a restricted user, the user could reload the device and it will reboot without guided access. However, if you choose to use a password for the device, this shouldn't be a problem.

小耗子 2024-10-24 14:18:49

Rick 描述的(诚然更简单)方法的替代方法是:

An alternative to the (admittedly much simpler) approach described by Rick is to:

放我走吧 2024-10-24 14:18:49

http://www.apple.com/support/ipad/enterprise/

Apple 提供企业配置工具,允许控制允许哪些应用程序等。这似乎是通过配置文件管理完成的。请参阅链接了解更多详情

http://www.apple.com/support/ipad/enterprise/

Apple provides enterprise configuration tools which allow control over which applications are permitted etc. This is done through profile management it seems. See link for more details

二智少女猫性小仙女 2024-10-24 14:18:49

我同意几个小时前的评论:设置>一般>限制应该能起到作用。如果用户无法安装任何东西,无法访问 Safari 或 Mail,那么就没有理由退出您的应用程序。

I agree with a comment from some hours ago: Settings > General > Restrictions should do the trick. If the user can't install anything, can't access Safari or Mail, then there is no reason to ever quit your app.

夏夜暖风 2024-10-24 14:18:49

阻止设备访问互联网(Wi-Fi 上的 MAC 过滤器可以解决这个问题)。任何其他非互联网相关问题(音乐、游戏等)应该已经可以通过当前的 IT 基础设施解决(除非您的开发人员在工作中播放和收听 MP3)。

Block internet access from device (MAC-filter on wi-fi can do the trick). Any other non-internet related problem (music, games, etc) should already be solvable by the current IT infrastructure (unless your developers plays and listen to MP3 at work).

望笑 2024-10-24 14:18:49

我找到了一种方法来退出这种锁定状态。
我已经通过 cydia 安装了“backgrounder”,如果您按下主页按钮一秒或更长时间,它会使您的应用程序在后台运行。
现在,当我长按主页按钮时,我回到主屏幕。

仅此而已。

注意长按。

i found one way to quit this home-lock state.
i have install "backgrounder" via cydia which make your app run in background if you press home button for one second or more.
and now, when i longpress home button, i back to the home screen.

that is all.

pay attention on longpress.

梦太阳 2024-10-24 14:18:49

嗯-不确定这是答案还是评论,但是-现在作为问题一部分的解决方案有一个弱点-我们的支持人员使用了这个并发现如果您“点击电源按钮以‘软关闭’然后在开机时按住主页按钮并滑动解锁。 有时,iPad 会在主页上启动,否则 XXAPPLCATIONXX 会挂起,然后退出主页,无论怎样,X 都可以在没有密码的情况下访问主页。”

Um- wasn't sure if this is an answer or a comment but - the solution that is now part of the question has a weakness - our support staff used this and found that if you "Tap the power button to ‘soft-off’ then hold the home button as you power on and slide to unlock. Sometimes iPad will start on the home page or else XXAPPLCATIONXX will hang and then drop out to the home page. Eitherway X is able to access the home page without the passcode."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文