Skip to content
Simone Martorelli edited this page Jan 13, 2022 · 45 revisions

In the follow images you can see all the customizable elements for each UI.

Pop-up

Popup example

Notification banner/alert

Banner example

Onboarding

Onboarding example

Please see more HERE about the Onboarding UI.

Syntax

~/IBM\ Notifier.app/Contents/MacOS/IBM\ Notifier [-type] [-payload] [-bar_title] [-title] [-subtitle] [-icon_path] [-accessory_view_type] [-accessory_view_payload] [-main_button_label] [-main_button_cta_type] [-main_button_cta_payload] [-secondary_button_label] [-secondary_button_cta_type] [-secondary_button_cta_payload] [-tertiary_button_label] [-tertiary_button_cta_type] [-tertiary_button_cta_payload] [-help_button_cta_type] [-help_button_cta_payload] [-timeout] [-always_on_top]

The available arguments list varies based on the type of UI you're trying to show to the end user, except for the -type argument of course, in fact some of these are specific for the Pop-up UI.

Common arguments

-type (Mandatory)
  Value: [ popup | banner | onboarding (available from v2.0.0) ]

  The UI type of the notification.

  Example: -type popup
-payload (available from v2.0.0)
  Value: "text"

  The payload of the onboarding workflow.

  Please see more here: https://github.com/IBM/mac-ibm-notifications/wiki/Onboarding-UI-Workflow
-title
  Value: "text"

  The title of the notification.

  Example: -title "Title"
-subtitle
  Value: "text"

  The subtitle of the notification.

  Example: -subtitle "Subtitle"
-main_button_label
  Value: "text"

  The label of the main button

  Example: -main_button_label "Main button title"
-main_button_cta_type
  Values:
     - none: exit with the related return value;
     - link: exit with the related return value and trigger the link defined in the payload.

  The call to action type for the main button (default: none -> exit).

  Example: -main_button_cta_type link
-main_button_cta_payload
  Value: "text"

  An URL if [ link ] cta type defined.

  Example: -main_button_cta_payload "URL"
-secondary_button_label
  Value: "text"

  The label of the secondary button.

  Example: -secondary_button_label "Secondary button title"
-secondary_button_cta_type
  Values:
     - none: exit with the related return value;
     - link: exit with the related return value and trigger the link defined in the payload.

  The call to action type for the secondary button (default: none -> exit).

  Example: -secondary_button_cta_type link
-secondary_button_cta_payload
  Value: "text"

  An URL if [ link ] cta type defined.

  Example: -secondary_button_cta_payload "URL"
-tertiary_button_label
  Value: "text"

  The label of the tertiary button.

  Example: -tertiary_button_label "Tertiary button title"
-tertiary_button_cta_type
  Values:
     - link: trigger the link defined in the payload;
     - exitlink: exit with the related return value and trigger the link defined in the payload.

  The call to action type for the tertiary button.

  Example: -tertiary_button_cta_type link
-tertiary_button_cta_payload
  Value: "text"

  A mandatory URL if [ link ] cta type defined, you can leave it empty if [ exitlink ] cta defined.

  Example: -tertiary_button_cta_type link -tertiary_button_cta_payload "URL"
  Example 2: -tertiary_button_cta_type exitlink -tertiary_button_cta_payload ""

Pop-up UI additional arguments

-bar_title
  Value: "text"

  The bar title for the "popup" UI type. Not used for "banner" UI type.

  Example: -bar_title "Bar Title"
-title_size (available from v2.5.0)
  Value: integer

  The title font size

  Example: -title_size 16
-icon_path
  Value: "text"

  The custom icon path defined for this notification (Available only for "popup" UI type)

  Example: -icon_path "~/Icon/Path.png"
-icon_width (available from v2.5.0)
  Value: integer

  The custom icon width defined for this notification (Max. 150px)

  Example: -icon_width 150
-icon_height (available from v2.5.0)
  Value: "text"

  The custom icon height defined for this notification (Max. 300px)

  Example: -icon_height 300
-accessory_view_type
  Value:
     - whitebox: white box with the text defined in the payload;
     - timer: countdown with the value defined in the payload;
     - image: image from the url/path defined in the payload;
     - video: video from the url/path defined in the payload;
     - progressbar: progress bar with the starting valued defined in the payload;
     - input: input field;
     - securedinput: secured input field;

  The UI type for the needed accessory view.

  Example: -accessory_view_type text
-accessory_view_payload
  Value: "text"

  The payload for the accessory view:
  - Text for [ whitebox ] view type;
  - (up to v2.0.0) Seconds for [ timer ] view type;
  - (from v2.1.0) Text for [ timer ] view type. This will be timer's label. Use "%@" to define timer's position inside the label. Use [ -timeout ] argument to define timer's duration;
  - File path/link for [ image | video ] view type;
  - Text with the format "/percent DOUBLE /top_message TEXT /bottom_message TEXT /user_interaction_enabled BOOL /user_interruption_allowed BOOL" for [ progressbar ] view type;
  - Text as placeholder for the [ input | securedInput ] view type.

  Example 1: -accessory_view_payload "This is the time left: %@" (from v2.1.0)
  Example 2: -accessory_view_payload ""/percent 0 /top_message This is the top message /bottom_message This is the bottom message
-secondary_accessory_view_type (available from v2.3.0)
  Same as for the -accessory_view_type argument.
-secondary_accessory_view_payload (available from v2.3.0)
  Value: "text"
  
  Same as for the -accessory_view_payload argument.

For more details about the available Accessory Views for the Pop-up UI please see here.

-help_button_cta_type
  Value:
     - link: trigger the url defined in the payload;
     - infopopup: shows an info pop-up with the text defined in the payload;

  The call to action type for the help button.

  Example: -help_button_cta_type link
-help_button_cta_payload
  Value: "text"

  An URL for [ link ] cta type or text for [ infopopup ] cta type.

  Example: -help_button_cta_payload "URL"
-always_on_top
  Value: nil

  Flag that tells the UI to keep the pop-up always on top of the window hierarchy.

  Example: -always_on_top
-silent (available from v2.0.1)
  Value: nil

  Flag that tells the UI to not produce any sound when appear.

  Example: -silent
-timeout
  Value: integer

  The timeout for the notification. After this amount of seconds the app exit with the related exit code (4) if no [ timer ] accessory view was defined.

  Example: -timeout 300
-miniaturizable (available from v2.3.0)
  Value: nil

  Flag that allows the UI to show the "miniaturize" button for the pop-up window.

  Example: -miniaturizable
-force_light_mode (available from v2.5.0)
  Value: nil

  Flag that force the UI in light mode.

  Example: -force_light_mode
-position (available from v2.2.0)
  Value: "text"

  Tells the app where to place the pop-up window.   
  Value:
  - center  
  - top_left  
  - top_right  
  - bottom_left  
  - bottom_right  

  Example: -position center
-popup_reminder (available from v2.5.0)
  Value: "text"
  
  A text payload to define the behavior of an optional reminder for the pop-up. The reminder is basically a timer at the end of which the pop-up is pushed again on top of the view hierarchy on screen. 
  The payload format is: "/timeinterval <TIME_IN_SECONDS> /silent /repeat"

  Example: -popup_reminder "/timeinterval 300"

Banner/Alert UI additional arguments

-notification_image (available from v2.5.0)
  Value: "text"

  Custom notification alert/banner attachment (image). It supports remote link, local path and base64 encoded image.

  Example: -notification_image "~/path/to/image.png"

Return values

  • 0 - Main button clicked.
  • 1 - Internal error.
  • 2 - Secondary button clicked.
  • 3 - Tertiary button clicked.
  • 4 - Timeout. (available from v2.0.0)
  • 200 - Untracked success.
  • 201 - Received SigInt.
  • 239 - User dismissed the notification banner/onboarding window.
  • 250 - Invalid number of arguments.
  • 255 - Invalid arguments syntax.
  • 260 - Unable to load resources

Syntactic rules

  • At least one argument between [ -title | -subtitle | -accessory_view_type + -accessory_view_payload ] must be defined to present a [ popup ] UI.
  • [ -payload ] must be defined and is the only argument needed to present an onboarding UI.
  • At least one argument between [ -title | -subtitle ] must be defined to present a banner UI.
  • By default tertiary button on [ popup ] UI type is not destructive. Use [ exitlink ] cta type to trigger a link (optional) and make it destructive for the pop-up.
  • In general if a call to action type is defined for a button, must be defined also the related payload. Except for the cta types [ none | exitlink ].
  • If no call to action type defined for a button the default one is [ none ], that simply return the exit code related to the clicked button.

Notes

  • IBM Notifier (Mac@IBM Notifications) provides also a configuration mode that let's the admin define some useful default values, please read more about here.
  • You can find some useful special arguments here.
  • The Alert UI needs additional configuration profile configuration to work properly. Please read more here.
Clone this wiki locally