iOS: 如何在airwatch中通过应用配置设置设备序列号?

iOS: How to set the device serial number via application configuration in airwatch?

在 JAMF 中,您可以使用 "App Configuration" 来告诉设备它自己的序列号,方法如下:

<dict>
    <key>device_serial_number</key>
    <string>$SERIALNUMBER</string>
</dict>

您只需将其直接粘贴到仪表板 "Mobile App" 区域的 "App Configuration" 框中:

这将告诉设备它自己的序列号,否则该信息不可用。

我想知道您是否可以在 AirWatch 中做同样的事情。对于他们的配置,它是一个键值字段列表。我在 "value" 字段中尝试了一堆不同的项目,例如:

{SerialNumber}{serialNumber}{Serial}$SERIALNUMBER{serialnumber}{serial},但似乎不起作用。

有人知道如何使用 AirWatch 通知 iOS 设备其序列号吗?

AirWatch 上序列号的 AppConfig 变量是 {DeviceSerialNumber}。这是完整列表:

{EmailDomain}
{EmailUserName}
{EmailAddress}
{EnrollmentUser}
{EnrollmentUserId}
{DeviceUid}
{DynamicScepChallenge}
{GroupIdentifier}
{SessionToken}
{DeviceFriendlyName}
{DeviceSerialNumber}
{UserPrincipalName}
{DeviceSerialNumberLastFour}
{DevicePlatform}
{DeviceModel}
{DeviceOperatingSystem}
{EmailUserNamePrompt}
{DeviceUidLastFour}
{DeviceReportedName}
{EmailPassword}
{DeviceAssetNumber}
{DeviceWLANMac}
{UserSmimeSigning}
{UserSmimeEncryption}
{SecureDeviceUdid}
{UserDistinguishedName}
{FirstName}
{LastName}
{EmailAddressPrompt}
{EmailDomainPrompt}

您可以在此处将其放入应用程序的 "Assignment" 中:

一旦它在那里,您就可以像这样通过 UserDefaults 访问它:

/**
 Retrieve the dictionary of keys stored by the MDM server

 - returns: dictionary of key/value pairs
 */
public func appConfig ()  -> Dictionary<String, Any>? {
    if let serverConfig = UserDefaults.standard.dictionary(forKey: "com.apple.configuration.managed")
    {
        return serverConfig
    }
    return nil
}