# How to enforce app installation on macOS devices?

Hexnode UEM simplifies the process of app management in an organization with its Required Apps policy for macOS devices. This ensures that all the requisite apps get installed on the devices, without any user intervention, with a simple policy push to the target entities. Hexnode UEM will identify if a required app(s) is missing on the device during the [scheduled device scan](https://www.hexnode.com/mobile-device-management/help/mdm-settings/#scheduled-device-scan) and flag the device as [non-compliant](https://www.hexnode.com/mobile-device-management/help/how-to-configure-compliance-settings-in-hexnode-mdm/). Hexnode UEM will also attempt to reinstall the missing app(s).

 Note: Apple only allows the deployment of **store apps purchased via Volume Purchase Program ([VPP apps](https://www.hexnode.com/mobile-device-management/help/how-to-deploy-apple-vpp-apps-with-hexnode-mdm/)), enterprise apps** and **[app bundles](https://www.hexnode.com/mobile-device-management/help/create-macos-app-bundle/)**, to Mac.

 

Creating Required Apps policy
-----------------------------

Apps can be added to macOS devices in bulk via the policy.

1. From the Hexnode UEM dashboard, navigate to **Policies** -> **New Policy**. Assign a suitable name and description for the policy, or you can choose to continue with an existing policy.
2. Choose **macOS -> App Management -> Required Apps**. Click **Configure**.
3. Check the ***Remove apps from the device on policy removal*** option to remove the apps when the policy is disassociated from the device.
     Note: 
    For macOS devices running version 11.0 or earlier, the VPP apps won’t be removed upon disenrollment, even if the option to remove them is checked.
4. Click **+Add** to either add an app or an app group from the local app repository.
5. Choose the required apps or app bundles from the list and click **Done**.
6. For the selected app(s), you can also configure success criteria as mentioned below. Click on **Configure**. **Success Criteria**
    
    For the app installation to be considered successful, the installed application must meet the selected criterion. You can choose either of the following options as the success criterion:
    
    
    1. **App Exists:** When this success criterion is selected, the **App Identifier** must be specified in the provided field. The app identifier is typically the *bundle ID* of the application. The installation is considered successful if the specified app identifier is found on the device.
        For example, the app identifier for Microsoft Teams would be *com.microsoft.teams2*.
    2. **File Exists:** When this success criterion is selected, the **File Path** must be specified in the provided field. The *location of the file* is set as the file path. The installation is considered successful if the application is located at the specified file path on the device.
        For example, the file path for Microsoft Teams would be */Applications/Microsoft Teams.app*.
    
    [![Configuring success criteria for DMG and PKG app installation on macOS using Hexnode UEM console.](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2018/09/Success-criteria-for-DMG-and-PKG-app-installation-for-macOS.png)](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2018/09/Success-criteria-for-DMG-and-PKG-app-installation-for-macOS.png "Success criteria for DMG and PKG app installation for macOS")
7. Specify the necessary settings and click **Save**.
8. You can review the apps chosen and remove any or all from the list, if needed. Click **Done**.
9. Next, associate the policy with the target device by clicking on **Policy Targets -> +Add Devices**.
10. Choose the target device and click **OK** to confirm.
11. Click **Save**.

### Associating Policies with target devices

If you are editing an existing policy and wish to associate the policy to more targets,

1. Navigate to the **Policies** tab, select the policy and click on **Manage** -> **Associate Targets**.
2. Add the target entities and click **Associate**.

You can also associate the policy from the **Manage** tab, in two ways.

1. Select the devices and click on **Manage** -> **Associate Policy**.
2. Click on the target device, **Actions** -> **Associate Policy**.

As soon as the policy gets associated with the device, the app gets installed silently, without any user intervention.

Installation criteria for app types with multiple versions
----------------------------------------------------------

Hexnode UEM allows adding multiple versions of an app, whether store or enterprise, to the app inventory. If multiple versions of an app are added to the Required Apps policy, only one version of the app will be pushed for installation on the devices. The priority of installation for different app versions depends on various scenarios that are explained below:

1. If the enterprise app version is the same as that of its store app version, the priority of installation will be based on the following order: 
    - Non-Ad-Hoc Enterprise version
    - Store version
    - Ad-Hoc Enterprise version
2. When the enterprise app version is greater than the store app version, the enterprise version will be installed on the macOS devices.
3. In case, if the store app version is higher than the enterprise app version, the store app version will be pushed to the devices.