使用autonomousSingleAppModePermittedAppIDs和UIAccessibilityRequestGuidedAccessSession与Meraki一起作为MDM进入单一应用程序模式 [英] Using autonomousSingleAppModePermittedAppIDs and UIAccessibilityRequestGuidedAccessSession together with Meraki as MDM to enter single app mode

查看:185
本文介绍了使用autonomousSingleAppModePermittedAppIDs和UIAccessibilityRequestGuidedAccessSession与Meraki一起作为MDM进入单一应用程序模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apple Configurator设置了少量设备作为监督设备。
但是我无法使用 UIAccessibilityRequestGuidedAccessSession API。

I have a small number of devices I've set as supervised using Apple Configurator. However I'm unable to get the app to successfully enter single app mode using the UIAccessibilityRequestGuidedAccessSession API.

我创建了一个带有限制的配置文件设置在Meraki控制台中,特别是我将Meraki控制台中的允许单一应用程序模式字段设置为我的应用程序包ID。

I created a configuration profile with restrictions set in the Meraki console, in particular I've set the "Allowed Single App Mode" field in the Meraki console to my app bundle id.

我假设这个Meraki中的字段映射到 autonomousSingleAppModePermittedAppIDs 配置键。我添加了我的应用程序,这是一个IPA(未从应用程序商店安装)安装在受监管设备上。

I'm assuming this field in Meraki maps to the autonomousSingleAppModePermittedAppIDs configuration key. I've added my app which is an IPA (not installed from the app store) to be installed on the supervised device.

配置文件和应用程序已成功安装但是,对 UIAccessibilityRequestGuidedAccessSession()的调用仍然失败。

The profile and the app is installed successfully on the iPad however the call to UIAccessibilityRequestGuidedAccessSession() still fails.

调用本身非常简单:

NSLog(@"requesting guided access");
UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed) {
    if (didSucceed) {
        NSLog(@"entered guided access");
        self.inGuidedSessionMode = YES;
        [[[UIAlertView alloc] initWithTitle:@"entered single access mode" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
    }
    else {
        NSLog(@"failed to enter guided access");
        [[[UIAlertView alloc] initWithTitle:@"Unable to enter single access mode" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
    }
});

设备日志显示以下条目

Mar 26 11:42:31 BayLeaf-Kiosk-4 backboardd[28] <Error>: HID: The 'Passive' connection 'xxxxxx' access to protected services is denied.
Mar 26 11:42:31 BayLeaf-Kiosk-4 xxxxxx[412] <Warning>: requesting guided access
Mar 26 11:42:31 BayLeaf-Kiosk-4 xxxxxx[412] <Warning>: viewDidLoad got called
Mar 26 11:42:31 BayLeaf-Kiosk-4 xxxxxx[412] <Warning>: applicationDidBecomeActive called
Mar 26 11:42:31 BayLeaf-Kiosk-4 xxxxxx[412] <Warning>: failed to enter guided access
Mar 26 11:42:31 BayLeaf-Kiosk-4 backboardd[28] <Error>: HID: The 'Rate Controlled' connection 'xxxxxx' access to protected services is denied.

是否有人能够成功让他们的应用进入导游访问?
我唯一能想到的是我的app不在appstore中,或者指定的bundle Id不正确,但我找不到导出Meraki创建的.mobileconfig来验证它是否匹配的方法我的应用程序。

Has anyone been able to successfully have their app enter guided access? The only thing I could think of was that my app is not in the appstore or that the bundle Id specified is incorrect, but I couldn't find a way to export the .mobileconfig created by Meraki to verify that it matches my app.

真的在我的智慧结束这个...我想也许Microsoft Surface(也有一个链接到一个帐户的应用程序模式)可能只是更容易做的事情。

Really at my wits end on this.. I'm thinking maybe Microsoft Surface (which also has a single app mode linked to an account) might just be the easier thing to do.

非常感谢任何帮助。
谢谢!

Would appreciate any help. Thanks!

PS:链接这个 @zeiteisen的回复非常有助于我达到这一点。

PS: linking this response by @zeiteisen which was very helpful to get me to this point.

更新:我很确定捆绑包ID是正确的,如果我使用我的应用程序名称/捆绑包ID作为同一配置文件中单个应用程序模式设置的值,我的应用程序立即进入单一应用程序模式(这不是我想要的,我希望它进入/以编程方式退出单个应用程序模式而不是被锁定。

UPDATE: I'm pretty sure the bundle Id is right, if I use my app name/bundle id as the value for the single app mode setting in the same configuration profile, my app immediately enters single app mode (which is not what I want, I want it to enter/exit single app mode programmatically and not be locked in).

UPDATE2:目前还不清楚是什么具体修改了问题,我只是从Meraki中删除了应用程序,删除了我的配置配置文件,将它们添加回来,一旦配置文件和应用程序被Meraki推送,它就可以工作。

UPDATE2: It's unclear what specific change fixed the issue, I simply deleted the app from Meraki, deleted my configuration profile, added them both back in and once the profile and app were pushed by Meraki, it just worked.

推荐答案

此外 - 我已经学会了这种试错法 - 如果您尝试在 viewDidLoad viewWillAppear / viewDidAppear ,它不会起作用。我从你的日志中看到你试图在 viewDidLoad 中锁定应用程序。
尝试使用计时器,也许这就是你的问题。

Also -- I've learnt this the trial-and-error way -- if you try locking in the app on viewDidLoad or viewWillAppear/viewDidAppear, it's not going to work. I see from your logs that you're trying to lock the app in viewDidLoad. Try using a timer instead, maybe that's your problem.

[self performSelector:@selector(handleLockButton:) withObject:nil afterDelay:1];

当然,您需要将自己的套件ID放在可以锁定自己的应用程序的白名单中访问。

Of course, you need your bundle ID to be on the whitelist of apps that can lock themselves into guided access.

快乐编码:)

Z。

这篇关于使用autonomousSingleAppModePermittedAppIDs和UIAccessibilityRequestGuidedAccessSession与Meraki一起作为MDM进入单一应用程序模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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