【问题标题】:Validating configuration dictionary from MDM server从 MDM 服务器验证配置字典
【发布时间】:2013-10-11 19:35:23
【问题描述】:

我正在开发一个使用 JAMF 作为我的 MDM 服务器的 MDM 解决方案。我正在使用 Apple 的新 API,利用 com.apple.configuration.managed 从推送服务器获取配置字典。在我的NSNotificationCenter. 中使用NSUserDefaultsDidChangeNotification 更改字典时,我注册以收到通知

我遇到的问题是我想在收到字典时对其进行验证,以确保标签和一切都正确。当我测试这个时,我会改变类似的东西

<key>Some_Key</key>

到

<key>Some_Key<key>

当我提交损坏的字典时,我从来没有收到有关字典更改的通知,我的控制台只会读出:

Oct 11 15:26:21-iPad mdmd[2772] <Notice>: (Note ) MDM: Push token received.
Oct 11 15:26:21-iPad mdmd[2772] <Notice>: (Note ) MDM: Received push notification.
Oct 11 15:26:21-iPad mdmd[2772] <Notice>: (Warn ) MDM: Ignoring extra keys in push dictionary: {
        time = 1381519580;
    }
Oct 11 15:26:21-iPad mdmd[2772] <Notice>: (Note ) MDM: Polling MDM server https://jss.jamfcloud.com/mycompany/mdm/ServerURL for next command.
Oct 11 15:26:21-iPad mdmd[2772] <Notice>: (Note ) MDM: Could not send response to MDM server. Error: NSError:
    Desc   : A connection to the server could not be established.
    US Desc: A connection to the server could not be established.
    Domain : MCHTTPTransactionErrorDomain
    Code   : 23001
    Type   : MCFatalError
    Params : (
        "https://jss.jamfcloud.com/mycompany/mdm/ServerURL",
        400
    )

我显然收到了推送,它在第二行中这么说,但由于它无效,我猜它不会更改存储在 com.apple.configuration.managed 中的字典。我如何拦截这样的错误,以便通知用户服务器配置不正确?

【问题讨论】:

  • 我创建了一个简单的服务来安装和配置托管应用程序。如果您对此仍有疑问,请查看 - testmdm.cloudapp.net

标签: iphone ios ipad ios7 mdm


【解决方案1】:

以下是对 MDM 工作原理的高级描述:

1) 您发送推送通知。此通知只是一条“回电”消息。

2) MDM 客户端(集成在 iOS 中)转到您的服务器以接收一个或多个命令(例如设置应用配置字典)

3) MDM 客户端执行这些命令

所以,你是对的,你收到了推送。但是,您的应用程序在第 2 项失败。它不接收命令,所以它不知道它是设置应用程序配置的命令还是擦除设备的命令。

因此,首先您需要让基本的 MDM 协议正常工作,然后才能使用其他命令。我相信即使您提交了正确的字典,您也不会收到通知。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-29
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    • 1970-01-01
    • 1970-01-01
    • 2011-11-18
    • 1970-01-01
    相关资源
    最近更新 更多