使用 Microsoft Intune 中的移动应用配置策略配置 iOS 应用Configure iOS apps with mobile app configuration policies in Microsoft Intune

适用于:经典控制台中的 IntuneApplies to: Intune in the classic console
正在查找有关 Azure 中的 Intune 的文档?Looking for documentation about Intune on Azure? 请转到此处Go here.

Microsoft Intune 中的移动应用配置策略可提供用户在运行应用时可能需要的设置。Use mobile app configuration policies in Microsoft Intune to supply settings that might be required when users run an app. 例如,应用可能要求用户指定:For example, an app might require users to specify:

  • 自定义端口号。A custom port number.

  • 语言设置。Language settings.

  • 安全设置。Security settings.

  • 公司徽标之类的品牌设置。Branding settings such as a company logo.

如果用户输入的这些设置不正确,可能会加重支持人员的负担并降低新应用的采用率。If users enter these settings incorrectly, this can increase the burden on your help desk and slow the adoption of new apps.

通过让你在运行应用之前将策略中的这些设置部署给用户,移动应用配置策略可消除此类问题。Mobile app configuration policies can help you eliminate these problems by letting you deploy these settings to users in a policy before they run the app. 随后这些设置会自动提供,用户无需执行任何操作。The settings are then supplied automatically, and users need to take no action.

无需直接向用户和设备部署这些策略,You do not deploy these policies directly to users and devices. 而是将策略与应用关联,然后部署应用。Instead, you associate a policy with an app, and then deploy the app. 只要应用检测到策略设置(通常在其首次运行时),即会使用它们。The policy settings will be used whenever the app checks for them (typically, the first time it is run).

提示

此策略类型目前仅适用于运行 iOS 8.0 及更高版本的设备。This policy type is currently available only for devices running iOS 8.0 and later. 它支持下列应用安装类型:It supports the following app installation types:

  • 来自应用商店的托管 iOS 应用程序Managed iOS app from the app store
  • iOS 应用包App package for iOS

有关应用安装类型的详细信息,请参阅使用 Microsoft Intune 部署应用For more information about app installation types, see Deploy apps with Microsoft Intune.

配置移动应用配置策略Configure a mobile app configuration policy

  1. Microsoft Intune 管理控制台,选择“策略”>“概述”>“添加策略”。In the Microsoft Intune administration console, choose Policy > Overview > Add Policy.

  2. 在策略列表中,展开“iOS”,选择“移动应用配置”,然后选择“创建策略”。In the list of policies, expand iOS, choose Mobile App Configuration, and then choose Create Policy.

    提示

    你只能配置此策略类型的自定义设置。You can configure only custom settings for this policy type. 建议的设置不可用。Recommended settings are not available.

  3. 在“创建策略”页的“常规”部分中,输入移动应用配置策略的名称和可选描述。In the General section of the Create Policy page, supply a name and an optional description for the mobile app configuration policy.

  4. 在该页面的“移动应用配置策略”部分,在框中输入或粘贴包含你期望的应用配置设置的 XML 属性列表。In the Mobile App Configuration Policy section of the page, in the box, enter or paste an XML property list that contains the app configuration settings that you want. 根据你所配置的应用,XML 属性列表的格式可能有所不同。The format of the XML property list will vary depending on the app you are configuring. 若需了解要使用确切格式的详细信息,请联系应用供应商。Contact the supplier of the app for details about the exact format to use.

    提示

    若要了解有关 XML 属性列表的详细信息,请参阅 iOS 开发人员库中的了解 XML 属性列表To find out more about XML property lists, see Understanding XML Property Lists in the iOS Developer Library.

  5. 单击“验证”,确保所输入的 XML 的属性列表格式有效。Click Validate to ensure that the XML that you entered is in a valid property list format.

    重要

    单击“验证”后,Intune 会检查所输入的 XML 的格式是否有效。When you click Validate, Intune checks that the XML you entered is in a valid format. 它不会检查 XML 属性列表是否会与其关联的应用共同发挥作用。It does not check that the XML property list will work with the app that it is associated with.

  6. 完成后,单击 “保存策略”When you are done, click Save Policy.

新策略显示在“配置策略” 节点中。The new policy is displayed in the Configuration Policies node.

有关 XML 文件格式的信息Information about the XML file format

Intune 在属性列表中支持以下数据类型:Intune supports the following data types in a property list:

  • <整数><integer>
  • <实数><real>
  • <字符串><string>
  • <数组><array>
  • <dict><dict>
  • <true /> 或 <false /><true /> or <false />

有关数据类型的详细信息,请参阅 iOS 开发人员库中的 关于属性列表For more information about data types, see About Property Lists in the iOS Developer Library.

此外,Intune 还支持属性列表中的以下令牌类型:Additionally, Intune supports the following token types in the property list:

  • {{userprincipalname}} -(示例:John@contoso.com{{userprincipalname}} - (Example: John@contoso.com)
  • {{mail}} -(示例:John@contoso.com{{mail}} - (Example: John@contoso.com)
  • {{partialupn}} -(示例:John{{partialupn}} - (Example: John)
  • {{accountid}} -(示例:fc0dc142-71d8-4b12-bbea-bae2a8514c81{{accountid}} - (Example: fc0dc142-71d8-4b12-bbea-bae2a8514c81)
  • {{deviceid}} -(示例:b9841cd9-9843-405f-be28-b2265c59ef97{{deviceid}} - (Example: b9841cd9-9843-405f-be28-b2265c59ef97)
  • {{userid}} -(示例:3ec2c00f-b125-4519-acf0-302ac3761822{{userid}} - (Example: 3ec2c00f-b125-4519-acf0-302ac3761822)
  • {{username}} -(示例:John Doe{{username}} - (Example: John Doe)
  • iOS 设备的 {{serialnumber}} -(示例:F4KN99ZUG5V2{{serialnumber}} - (Example: F4KN99ZUG5V2) for iOS devices
  • iOS 设备的 {{serialnumberlast4digits}} -(示例:G5V2{{serialnumberlast4digits}} - (Example: G5V2) for iOS devices

{{ 和 }} 字符仅供令牌类型使用,不得用于其他目的。The {{ and }} characters are used by token types only and must not be used for other purposes.

将移动应用配置策略与应用关联Associate a mobile app configuration policy with an app

创建移动应用配置策略后,必须将其与 iOS 应用(希望将配置策略设置应用到的应用)关联。After you have created a mobile app configuration policy, you must associate it with the iOS app to which you want the settings in the configuration policy to apply.

为此,请按照在 Microsoft Intune 中为移动设备添加应用使用 Microsoft Intune 部署应用中创建应用部署的步骤操作。To do this, follow the steps to create an app deployment in Add apps for mobile devices in Microsoft Intune and Deploy apps with Microsoft Intune. 到达向导的“移动应用配置”页时,请从“应用配置策略”下拉列表选择要与应用关联的策略。When you reach the Mobile App Configuration page of the wizard, select the policy that you want to associate with the app from the App Configuration Policy drop-down list.

然后,如往常一样继续部署和监视应用部署。Then, continue to deploy and monitor the app deployment as usual.

当部署的应用在设备上运行时,将使用你在移动应用配置策略中配置的设置运行。When the deployed app is run on a device, it will run with the settings that you configured in the mobile app configuration policy.

提示

如果一个或多个移动应用配置策略发生冲突,则不会强制实施任一策略。If one or more mobile app configuration policies conflict, neither policy is enforced. 在 Intune 管理控制台“仪表板”中将报告冲突。The conflict will be reported in the Intune administration console Dashboard.

移动应用配置 XML 文件的示例格式Example format for a mobile app configuration XML file

在创建移动应用配置文件时,你可以指定下面的一个或多个使用此格式的值:When you create a mobile app configuration file, you can specify one or more of the following values by using this format:

<dict>
  <key>userprincipalname</key>
  <string>{{userprincipalname}}</string>
  <key>mail</key>
  <string>{{mail}}</string>
  <key>partialupn</key>
  <string>{{partialupn}}</string>
  <key>accountid</key>
  <string>{{accountid}}</string>
  <key>deviceid</key>
  <string>{{deviceid}}</string>
  <key>userid</key>
  <string>{{userid}}</string>
  <key>username</key>
  <string>{{username}}</string>
  <key>serialnumber</key>
  <string>{{serialnumber}}</string>
  <key>serialnumberlast4digits</key>
  <string>{{serialnumberlast4digits}}</string>
  <key>udidlast4digits</key>
  <string>{{udidlast4digits}}</string>
</dict>
要提交产品反馈,请访问 Intune Feedback