Policy defaults and custom policies

This article discusses the ways you can work with policies in your wrapped ISV apps.

Change policy defaults for unmanaged premium apps

The MDX App SDK includes the following policy files that specify policy defaults for unmanaged Premium apps only.

  • Android: Applications/Citrix/MDXToolkit/data/MDXSDK_Android/ default_sdk_policies.xml
  • iOS: Applications/Citrix/MDXToolkit/data/MDXSDK/default_policies.xml

All of the policies in those files are disabled. Any policies not in the file are ignored for unmanaged Premium apps.

You can change the default settings as follows.

  1. Make a backup of any default policy files you plan to change, in case you need them later.
  2. To change a policy default for ISV apps, use the policy values specified in the MDX Toolkit documentation, in MDX policies for Android apps and MDX policies for iOS apps.
  3. Include the default policy file with your app resources when you build the Premium app.

Create custom policies

The policy files in the MDX Toolkit provide full definitions of the policies, including the policy label and help text displayed in the Citrix Endpoint Management console. When you wrap an app, these policies are are included with the generated .mdx file. You can add custom policies to these files, which are located in the MDX Toolkit installation folder in Applications/Citrix/MDXToolkit/data.

  1. Make a backup of any policy files you plan to change, in case you need them later.

  2. To add policies to the policy XML files, use the formats provided in “Policy Formats,” next.

  3. When you wrap your app, specify the location of your modified policy XML file by including the -policyxml option with the wrapping command line:

    -policyxml /Applications/Citrix/MDXToolkit/data/policy_metadata.xml

    For details about using the command line to wrap ISV apps, see Enterprise iOS app wrapping using the command line and ISV Android app wrapping with the command line

  4. To verify the policy names, descriptions, and values in the Citrix Endpoint Management console, upload your app to Endpoint Management.

Guidelines for adding policies

  • Change only the items shown in bold.
  • The value of the PolicyName element is the name called from your app.
  • The value of the PolicyCategory element is the category name under which the policy will be listed in the Citrix Endpoint Management console. To look up category names, see the CategoryId values in the <Category> section of the MDX policy files.
  • The value of the PolicyDefault element is the default setting of your policy.
  • The POLICY_ID in <Title res_id=”POLICY_ID”> is a unique ID used for the policy. The ID must start with a letter, cannot include spaces, and includes only letters, numbers, or the underscore character.
  • The value of the Title element is the policy label that appears in the Citrix Endpoint Management console.
  • The POLICY_DESC_ID in <Description res_id=”POLICY_DESC_ID”> is a unique ID for the policy description. The ID must start with a letter, cannot include spaces, and includes only letters, numbers, or the underscore character.
  • The value of the Description element is the policy description that appears in the Citrix Endpoint Management console.

String

<Policy>
   <PolicyName>PolicyName</PolicyName>
   <PolicyType>string</PolicyType>
   <PolicyCategory>Category_ID</PolicyCategory>
   <PolicyDefault>Value</PolicyDefault>
   <PolicyStrings>
      <Title res_id="POLICY_ID”>Sample String Policy</Title>
      <Description res_id="POLICY_DESC_ID">
          Please enter the policy value.
      </Description>
   </PolicyStrings>
</Policy>
<!--NeedCopy-->

Boolean

<Policy>
   <PolicyName>PolicyName</PolicyName>
   <PolicyType>string</PolicyType>
   <PolicyCategory>Category_ID</PolicyCategory>
   <PolicyDefault>false</PolicyDefault>
   <PolicyStrings>
        <Title res_id="POLICY_ID”>Sample Boolean Policy</Title>
      <BooleanTrueLabel res_id="POLICY_ON">On</BooleanTrueLabel>
      <BooleanFalseLabel res_id="POLICY_OFF">Off</BooleanFalseLabel>
      <Description res_id="POLICY_DESC_ID">
          If On, the app does something.
          If Off, the app does something else.

            Default value is Off.
      </Description>
   </PolicyStrings>
</Policy>
<!--NeedCopy-->

Enum

<Policy>
   <PolicyName>PolicyName</PolicyName>
   <PolicyType>enum</PolicyType>
        <PolicyEnumValues>
         <PolicyEnumValue>
               <PolicyEnumValueId>Value1</PolicyEnumValueId>
            <PolicyEnumValueString res_id="ID_1">Yes</PolicyEnumValueString>
            </PolicyEnumValue>
            <PolicyEnumValue>
               <PolicyEnumValueId>Value2</PolicyEnumValueId>
            <PolicyEnumValueString res_id="ID_2">No</PolicyEnumValueString>
         </PolicyEnumValue>
         <PolicyEnumValue>
            <PolicyEnumValueId>Value3</PolicyEnumValueId>
            <PolicyEnumValueString res_id="ID_3">Maybe</PolicyEnumValueString>
            </PolicyEnumValue>
        </PolicyEnumValues>
   <PolicyCategory>Category_ID</PolicyCategory>
   <PolicyDefault>Value1</PolicyDefault>
   <PolicyStrings>
        <Title res_id="POLICY_ID”>Sample Enum Policy</Title>
      <Description res_id="POLICY_DESC_ID">
          Sample policy description.

             Default value is Yes.
      </Description>
   </PolicyStrings>
</Policy>
<!--NeedCopy-->
Policy defaults and custom policies