gpt4 book ai didi

ios7 - 使用自主SingleAppModePermittedAppIDs 和 UIAccessibilityRequestGuidedAccessSession 与 Meraki 作为 MDM 进入单应用模式

转载 作者:行者123 更新时间:2023-12-03 23:59:47 25 4
gpt4 key购买 nike

我使用 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 作为单一应用模式设置的值,我的应用会立即进入单一应用模式(这不是我想要,我希望它以编程方式进入/退出单个应用程序模式而不是被锁定)。

更新2:目前还不清楚具体的更改解决了这个问题,我只是从 Meraki 中删除了该应用程序,删除了我的配置文件,然后将它们重新添加,一旦 Meraki 推送了配置文件和应用程序,它就可以工作了。

最佳答案

另外——我已经通过反复试验的方式了解到这一点——如果你尝试在 viewDidLoad 上锁定应用程序或 viewWillAppear/viewDidAppear ,它不会工作。我从您的日志中看到您正试图将应用程序锁定在 viewDidLoad 中。 .
尝试使用计时器,也许这是你的问题。

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

当然,您需要将您的捆绑包 ID 放在可以将自己锁定为引导访问的应用程序白名单中。

快乐编码:)

Z。

关于ios7 - 使用自主SingleAppModePermittedAppIDs 和 UIAccessibilityRequestGuidedAccessSession 与 Meraki 作为 MDM 进入单应用模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22672486/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com