我正在使用JAMF作爲我的MDM服務器的MDM解決方案。我正在使用Apple的新API,利用從推送服務器獲取配置字典。我註冊時得到通知的字典使用NSUserDefaultsDidChangeNotification
改變了我的NSNotificationCenter.
驗證來自MDM服務器的配置字典
我遇到的問題是我要驗證的字典,當我收到它,以確保標籤的一切都是正確的。當我測試這一點,我會改的類似
<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
)
我明明收到的推動下,它是這麼說的第二行,但作爲它不是有效的,我想這不是改變存儲在字典。我如何攔截這樣的錯誤,以便我可以通知用戶服務器配置不正確?
我已經創建了一個用於安裝託管應用程序並進行配置的簡單服務。如果您仍然遇到此問題,請查看 - http://testmdm.cloudapp.net – tomasmcguinness