【问题标题】:Using autonomousSingleAppModePermittedAppIDs and UIAccessibilityRequestGuidedAccessSession together with Meraki as MDM to enter single app mode使用自主SingleAppModePermittedAppIDs 和 UIAccessibilityRequestGuidedAccessSession 与 Meraki 作为 MDM 进入单应用模式
【发布时间】:2014-03-26 20:35:41
【问题描述】:

我使用 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:链接@zeiteisen 的this 回复,这对让我了解这一点非常有帮助。

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

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

【问题讨论】:

    标签: ios7 mdm guided-access


    【解决方案1】:

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

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

    当然,您需要将您的捆绑包 ID 列入可将自己锁定为引导式访问的应用白名单。

    编码愉快:)

    Z.

    【讨论】:

      【解决方案2】:

      确保您的配置文件看起来像这样并且应该可以正常工作:

      <key>autonomousSingleAppModePermittedAppIDs</key>
      <array>
          <string>org.mycompany.myapp</string>
      </array>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-03-14
        • 2018-05-21
        • 2011-05-14
        • 1970-01-01
        相关资源
        最近更新 更多