# Deploy swiftDialog on macOS with a PKG Fileset

## Description

[swiftDialog](https://github.com/swiftDialog/swiftDialog) is an open source macOS utility that lets scripts display dialogs, progress, and prompts to the signed-in user. This recipe packages swiftDialog as a FileWave PKG Fileset and optionally deploys a profile that allows notifications.

## Ingredients

- FileWave Central
- swiftDialog PKG - [swiftDialog releases on GitHub](https://github.com/swiftDialog/swiftDialog/releases)
- Example PKG Fileset - [PKG - swiftDialog.fileset.zip](https://kb.filewave.com/attachments/201)
- Profile Fileset to enable notifications for swiftDialog - [Profile - swiftDialog - Enable Notifications.fileset.zip](https://kb.filewave.com/attachments/211)

## Directions

<div class="pointer-container" id="bkmrk-%C2%A0" tabindex="-1"><div class="pointer flex-container-row items-center justify-space-between p-s anim is-page-editable"><div class="flex-container-row items-center gap-s"><div class="input-group"> </div></div></div></div>### Deploying swiftDialog to your Macs using FileWave

1. Download the required swiftDialog PKG from the [current GitHub releases](https://github.com/swiftDialog/swiftDialog/releases). Check that release's macOS requirement before setting the Fileset compatibility range.
2. Create a new PKG fileset in FileWave and import the swiftDialog PKG. See the example: [PKG - swiftDialog.fileset.zip](https://kb.filewave.com/attachments/201)
    - Choose **New Desktop Fileset**, select **PKG**, then import the downloaded package.
    - In the Fileset properties, set the supported macOS range to match the swiftDialog release you downloaded. Current releases can require a newer macOS version than older packages.
    - Additionally the script below was added to set the notification icon to be a FileWave icon. You'll see in our example Fileset that it has this as a Preflight Script. When the icon is in place before the PKG it allows the custom icon to be used.  
          
        ```shell
        #!/bin/zsh
        
        if [ -f "/usr/local/sbin/FileWave.app/Contents/Resources/fwGUI.app/Contents/Resources/kiosk.icns" ]
        then
            mkdir -p "/Library/Application Support/Dialog/"
            sips -s format png /usr/local/sbin/FileWave.app/Contents/Resources/fwGUI.app/Contents/Resources/kiosk.icns --out "/Library/Application Support/Dialog/Dialog.png"
        else
            echo "File not found: /usr/local/sbin/FileWave.app/Contents/Resources/fwGUI.app/Contents/Resources/kiosk.icns"
        fi
        
        exit 0
        
        ```
3. Download [Profile - swiftDialog - Enable Notifications.fileset.zip](https://kb.filewave.com/attachments/211) if you want to allow swiftDialog notifications.
4. Assign both swiftDialog and the swiftDialog Enable Notifications Filesets to your target macOS devices.

## Related Links

- [swiftDialog GitHub](https://github.com/swiftDialog/swiftDialog) - official project and documentation
- [acodega/dialog-scripts: Scripts to use with the awesome Dialog app https://github.com/bartreardon/Dialog](https://github.com/acodega/dialog-scripts)
- [SecondSonConsulting/swiftDialogExamples (github.com)](https://github.com/SecondSonConsulting/swiftDialogExamples)
- [Installomator - The one installer script to rule them all (macOS Script)](https://kb.filewave.com/books/software-deployment-recipes-macos/page/installomator-the-one-installer-script-to-rule-them-all-macos-pkg "Installomator - The one installer script to rule them all (macOS Script)")