This post was originally published at Notifications have been moved to a plugin

Starting in Corona SDK build 2014.2542, local and push notifications have been moved to a plugin.

On Corona SDK, you will need to update your project’s build.settings file so that the plugins table includes the following:

On Corona Enterprise, there will be plugin binaries available in the plugins zip corresponding to the above daily build.

iOS Push Permissions Dialog

One of the benefits of this plugin is to give you more control over the timing of the push notification permissions dialog, an often requested feature.

With this plugin, push notifications on iOS are no longer automatically registered. Instead, you must explicitly request for the use of push notifications, prompting iOS to ask for permission:

Deprecated APIs

Since we are moving notifications into a plugin, we are deprecating core APIs:

* system.cancelNotification() => notifications.cancelNotifications
* system.scheduleNotification() => notifications.scheduleNotification

The deprecated APIs eventually be removed so we recommend you migrate your code. For convenience, we have modified the deprecated APIs to call through to the plugin APIs, but you must still include the notification plugin (e.g. the build.settings above).

Documentation

Please refer to the notification documentation for full details

Read original article:

This post was originally published at Notifications have been moved to a plugin