Let the user quit
When using Octory to onboard a user, it is possible to condition whether the user is able to exit the app, and when they will be able to do so. Let's take a look at some useful keys related to this termination process.
Let the user quit if the installation is incomplete
In case the installation of packages or file is something not mandatory in your onboarding process,
you might be interested by the key Navigation→
UserCanQuitIfInstallationIsIncomplete which has a default false value.
Let's face it, everybody does mistakes. Have you ever realised too late you deployed Octory with a monitor that will never be installed?
In this case, the application will never let the user quit unless you put the key Navigation→
which is not ideal if you want to ensure all packages and/or mandatory files are installed properly.
Acknowledging that, Octory offers a force quit option from
2.0.3, which you can customize. This lets your users enter a key combination to exit the app even if the installation is not complete,
and the Navigation→
UserCanQuitIfInstallationIsIncomplete is set to
False. When the key combination is entered, Octory will terminate while trying to execute the termination script.
This could be useful to relaunch the app for example, or to send the log to the MDM. To customize this termination script, you can read this tip.
In the following example, we ask the application to disable the shortcut ⌘Q to quit the app in favor of ⌃⌥⌘Q, we specify a script to execute depending on whether the installation of monitors is complete. As mentionned above, you can change the final key used to force quit the app, while the modifier keys remain the same: ⇧⌃⌥⌘. So here we change the default "F" key to "H".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- ... -->
As the key
ForceQuitShortcutIsEnabled has a default
True value, we do not have to specify it. With this configuration,
the user will be able to exit the app with ⇧⌃⌥⌘H.
In case of the key Window→
IsClosable is set to true, the end user can close the window.
Doing so, the application will not execute the termination script, neither execute actions sets with a "Termination" trigger.
This is an option more useful when Octory is used as a classic app rather than as an onboarding one.
Finally, it is worth to know that you can add a validation to any
Doing so, the user will not be able to navigate to the next slide as long as one input component with a validation key is not valid.
Similarly, if the user is at the last slide, they will not be able to exit the app.
In an upcoming tutorial, we will take a deep dive into how validation can be setup with input components to make sure the user enters valid information.