我已完成 iOS MDM 注册阶段以及 APN 推送命令(如 DeviceInformation、DeviceLock 等)。
现在我正在尝试通过设备推送策略(限制)、wifi 配置和密码。
因此,目前我的设备中安装了一个配置文件,即 MDM 管理配置文件。
经历这个Updating Configuration Profile installed in iOS device in MDM论坛中,每当我们想要应用策略时,我们都必须向设备发送 InstallProfile 命令。
但是当我在设置 -> 常规 -> 配置文件下的配置文件部分中执行此操作时,我看到安装了 2 个配置文件,其中一个是我的 MDM 负载,第二个是我发送的限制负载。
这就是我尝试发送有效负载的方式
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>InstallProfile</string>
<key>Payload</key>
<data>cGhfbWRtX2Jhc2VfNjRfZW5jb2RlZA==</data>
</dict>
<key>CommandUUID</key>
<string>ph_mdm_command_uuid</string>
</dict>
</plist>
这里有效负载值包含配置文件的base64编码plist,这是我的配置文件配置,它在InstallProfile请求类型的有效负载中发送。
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string></string>
<key>PayloadDisplayName</key>
<string>Restrictions</string>
<key>PayloadIdentifier</key>
<string>com.hQLvCF.mdm.version1.mdm3.restrictions1</string>
<key>PayloadOrganization</key>
<string></string>
<key>PayloadType</key>
<string>com.apple.applicationaccess</string>
<key>PayloadUUID</key>
<string>E9D5CFA9-4482-47DA-9CFA-5AA7AF4F62DC</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>allowAddingGameCenterFriends</key>
<true/>
<key>allowAppInstallation</key>
<true/>
<key>allowAssistant</key>
<true/>
<key>allowAssistantWhileLocked</key>
<true/>
<key>allowBookstoreErotica</key>
<true/>
<key>allowCamera</key>
<true/>
<key>allowCloudBackup</key>
<true/>
<key>allowCloudDocumentSync</key>
<true/>
<key>allowDiagnosticSubmission</key>
<true/>
<key>allowExplicitContent</key>
<true/>
<key>allowGlobalBackgroundFetchWhenRoaming</key>
<true/>
<key>allowInAppPurchases</key>
<true/>
<key>allowMultiplayerGaming</key>
<true/>
<key>allowPassbookWhileLocked</key>
<true/>
<key>allowPhotoStream</key>
<true/>
<key>allowSafari</key>
<true/>
<key>allowScreenShot</key>
<true/>
<key>allowSharedStream</key>
<true/>
<key>allowUntrustedTLSPrompt</key>
<true/>
<key>allowVideoConferencing</key>
<true/>
<key>allowVoiceDialing</key>
<true/>
<key>allowYouTube</key>
<true/>
<key>allowiTunes</key>
<true/>
<key>forceEncryptedBackup</key>
<false/>
<key>forceITunesStorePasswordEntry</key>
<false/>
<key>ratingApps</key>
<integer>1000</integer>
<key>ratingMovies</key>
<integer>1000</integer>
<key>ratingRegion</key>
<string>us</string>
<key>ratingTVShows</key>
<integer>1000</integer>
<key>safariAcceptCookies</key>
<integer>2</integer>
<key>safariAllowAutoFill</key>
<true/>
<key>safariAllowJavaScript</key>
<true/>
<key>safariAllowPopups</key>
<true/>
<key>safariForceFraudWarning</key>
<false/>
</dict>
</array>
<key>PayloadDescription</key>
<string>Push Policies</string>
<key>PayloadDisplayName</key>
<string>Policy Push</string>
<key>PayloadIdentifier</key>
<string>com.hQLvCF.mdm.version1.mdm3</string>
<key>PayloadOrganization</key>
<string></string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>73D449F8-342F-4B53-9786-B888A0203349</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
现在发生的情况是,它在我的设备上显示了这个新的配置文件,其配置文件名称为“推送策略”。 Wi-Fi 配置文件的情况类似。
我的问题是:
如何将此策略有效负载合并到 MDM 有效负载中,而不创建/安装新的配置文件。
自从我发送了 InstallProfile 命令后,这个新的配置文件就出现了。我希望此策略或 wifi 配置位于 mdm 有效负载内。
可以随时在系统中删除或添加策略和 Wifi 配置。因此我们在注册设备时无法添加默认值。
我希望我已经说清楚了。
感谢您的阅读。
最佳答案
你不应该做你所描述的事情。
常见的做法是安装额外的配置文件。因此,您拥有基本的 MDM 配置文件,并且还有许多与其分离的其他配置文件。
根据 MDM 文档,好的模式是在配置文件中同时拥有“胡萝卜”和“大棒”(例如,为网络设置复杂密码 + Wifi 的要求)。然而,据我所知,很多公司并没有这样做。
关于java - iOS MDM : apply Policies (Restrictions) and Wifi Configurations on Device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25667380/