我使用 Apple Configurator 将少量设备设置为受监管。
但是,我无法使用以下命令让应用程序成功进入单一应用程序模式UIAccessibilityRequestGuidedAccessSession API.
我创建了一个配置文件,并在 Meraki 控制台中设置了限制,特别是我已将 Meraki 控制台中的“允许的单一应用程序模式”字段设置为我的应用程序包 ID。
我假设 Meraki 中的该字段映射到autonomousSingleAppModePermittedAppIDs
配置键。我已添加我的应用程序,该应用程序是要安装在受监督设备上的 IPA(不是从应用程序商店安装的)。
配置文件和应用程序已成功安装在 iPad 上,但是调用UIAccessibilityRequestGuidedAccessSession()
仍然失败。
调用本身非常简单:
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.
有人能够成功让他们的应用进入引导访问吗?
我唯一能想到的是我的应用程序不在应用程序商店中,或者指定的捆绑包 ID 不正确,但我找不到导出 Meraki 创建的 .mobileconfig 的方法来验证它是否与我的应用程序匹配。
我对此真的束手无策。我想也许 Microsoft Surface(它也有一个链接到帐户的单一应用程序模式)可能是更容易做的事情。
将不胜感激任何帮助。
谢谢!
PS:链接this@zeiteisen 的回复对我做到这一点非常有帮助。
更新:我很确定捆绑包 ID 是正确的,如果我使用我的应用程序名称/捆绑包 ID 作为同一配置文件中的单一应用程序模式设置的值,我的应用程序会立即进入单一应用程序模式(这不是我想要的)想要,我希望它以编程方式进入/退出单一应用程序模式而不是被锁定)。
UPDATE2:目前尚不清楚是什么具体更改解决了该问题,我只是从 Meraki 删除了该应用程序,删除了我的配置文件,然后将它们重新添加回来,一旦 Meraki 推送了配置文件和应用程序,它就起作用了。