The notification module allows you to schedule notification messages that are shown in the iOS Notification Center. Scheduled notifications are delivered even when your script (or even the entire app) is no longer running.
It is also possible to attach a URL to a notification that is launched when the notification is activated (e.g. selected in Notification Center).
Functions in the notification module:
Schedule a notification with the given message text.
The return value is a dict that can be used as the notification parameter for the cancel() function.
delay is the time interval in seconds until the notification is delivered.
sound_name can be any of the bundled sound effects that are also available via the sound module. Use an empty string to schedule a silent notification. Using an non-existing sound effect (e.g. ‘default’) will result in the system’s standard alert sound being played.
With the action_url parameter, you can specify a URL that is opened when the notification is activated (e.g. by tapping it in Notification Center). Which app is used to open the URL depends on the URL’s scheme, e.g. for http: URLs, Safari is used.
Cancel a notification that was previously scheduled.
Cancel all previously scheduled notifications.