0

In JAMF, you can use "App Configuration" to tell the device it's own serial number using something like this:

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

You just paste that directly into the "App Configuration" box in the "Mobile App" area of the dashboard:

enter image description here

This will tell the device it's own serial number, as that information is not available otherwise.

I'm wondering if you can do the same thing in AirWatch. For their configuration, it's a list of key value fields. I've tried a bunch of different items in the "value" field, such as:

{SerialNumber}, {serialNumber}, {Serial}, $SERIALNUMBER, {serialnumber}, {serial}, but it does not seem to work.

Anyone know how to inform an iOS device of it's serial number using AirWatch?

4

1 回答 1

1

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}

您可以在此处将其放入应用程序的“作业”中:

任务

一旦它在那里,您可以通过 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
}
于 2018-06-08T16:21:32.403 回答