Skip to main content

Deploying Swif Silently on Mac/macOS Machines

Updated yesterday

The Swif silent installer for macOS simplifies the process of enrolling devices into Swif's management system and removing existing MDM profiles. This guide outlines the steps to retrieve required configurations, prepare the installer, and deploy it silently on macOS devices.


Important Note: Silent Installer Does Not Support BYOD Enrollment

The Swif silent installer for macOS is designed for corporate-owned devices and does not support Bring Your Own Device (BYOD) enrollment. Ensure that all devices being enrolled using the silent installer are organization-owned.

Here's a concise, formatted notice you can add directly to your support article on deploying Swif silently on macOS (https://help.swif.ai/en/articles/10023949-deploying-swif-silently-on-mac-macos-machines):


Important Notes about Existing MDM Profiles

  • After installation, the Swif Agent checks every 10 minutes for existing MDM profiles:

    • It will automatically attempt to remove any existing non-Swif MDM profiles using admin permissions, typically without requiring a removal password.

    • If an Identifier and Removal Key are provided (optional), the Agent will additionally attempt to use this combination to remove existing MDM profiles.

    • Swif does not detect or remove any existing agents, services, or apps related to other MDM providers.

  • DEP-Protected Devices:
    If your device is enrolled in Apple's Automated Device Enrollment (DEP), please check the DEP profile configuration:

    • If the DEP profile is set to removable, the Swif Agent will automatically remove it.

    • If the DEP profile is set to non-removable, the Swif Agent cannot remove it. In this case, you must manually remove the device from your existing MDM provider before enrolling in Swif.


Step 1: Retrieve old MDM's Identifier and Removal Key (Optional - Needed when you have an existing MDM)

Before downloading the silent installer, you need to retrieve and save the identifier and removal key of the existing MDM profile in the Swif configuration area. These values are required when the MDM profile is password-protected, as the removal key serves as the profile's password.

Retrieve the Identifier of the Existing MDM Profile

  1. Open the Terminal application.

  2. Run the following command to list all profiles and extract detailed information in XML format:

    sudo /usr/bin/profiles list -output stdout-xml
  3. Locate the enrollment profile in the output by finding the PayloadType key with the value com.apple.mdm:

    <key>PayloadType</key> 
    <string>com.apple.mdm</string>
  4. Identify the identifier under the <key>PayloadIdentifier</key> tag:

    <key>PayloadIdentifier</key> 
    <string>com.companyname.mdm</string>
    • In this example, the identifier is com.companyname.mdm.

Removal Key

  • The removal key is the password associated with the MDM profile. This is necessary to remove profiles that are password-protected. If you don’t know the removal key, you may need to contact the previous MDM provider or your IT administrator.

Save the Identifier and Removal Key

  • Save the retrieved identifier and removal key in the Swif configuration area under the silent installer tab. This step is necessary before proceeding to the installer download.


Step 2: Download the Silent Installer

You can download the silent installer directly from the Swif admin dashboard. However, macOS may flag browser-downloaded files as potentially unsafe. To avoid this, we recommend using the CURL command in the Terminal to download the installer securely.

Use CURL to Download the Installer

Run the following command in your Terminal to download the installer:

curl -OL https://cdn.swifteam.com/st-agent-ui/{{TEAM_ID}}/1.40.0/macOS-Silent-macos-installer-x64-1.40.0.pkg

Replace {{TEAM_ID}} with your organization’s Swif team ID.


Step 3: Install Swif Silently

Once the installer is downloaded, use the following command to install Swif silently:

sudo installer -pkg macOS-Silent-macos-installer-x64-1.40.0.pkg -target /

The silent installer will automatically use the identifier and removal key to remove any existing MDM profiles and enroll the device into Swif.


Step 4: Verify Installation

  1. After the installation is complete, verify that the Swif agent has been successfully installed and the device is enrolled in Swif.

  2. Check for the removal of the previous MDM profile by running:

    sudo /usr/bin/profiles list

Additional Notes

  • After installation, the Swif Agent checks every 10 minutes for existing MDM profiles:

    • It will automatically attempt to remove any existing non-Swif MDM profiles using admin permissions, typically without requiring a removal password.

    • If an Identifier and Removal Key are provided (optional), the Agent will additionally attempt to use this combination to remove existing MDM profiles.

    • Swif does not detect or remove any existing agents, services, or apps related to other MDM providers.

  • Important: For devices enrolled via Apple’s Automated Device Enrollment (DEP), if the DEP profile is marked as non-removable, the Swif Agent cannot remove it. You must manually remove the device from your existing MDM provider in this case.

  • If you attempt installation by double-clicking the downloaded package and it does not open, enable it manually under System Settings > Privacy & Security. Using the command-line installation method (above) is strongly recommended instead.


Benefits of Silent Installation

  • Streamlined Setup: Automates the removal of existing MDM profiles and enrollment into Swif.

  • Scalable Deployments: Supports bulk deployment for enterprise environments.

  • User-Friendly Transition: Ensures minimal disruption during the device management transition.

For additional support, visit our help center or contact Swif support.

P.S. You can also use the silent installer on existing MDM-managed machines to silently migrate the existing MDM to Swif. Here are 2 examples:

Note, that the silent installer package can not be opened by double-clicking because of Apple policy or you might get this error "macOS silent installer can't be opened because Apple cannot check it for malicious software.

Did this answer your question?