21 January 2015
Local/Push Notifications Moved to a Plugin
Starting in Corona SDK build 2015.2542, local and push notifications have been moved to a plugin. If you’re using this feature, you will need to update your project’s build.settings
file so that the plugins
table includes the following:
1 2 3 4 5 6 7 8 9 10 |
settings = { plugins = { ["plugin.notifications"] = { publisherId = "com.coronalabs", }, }, } |
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:
1 2 |
local notifications = require( "plugin.notifications" ) notifications.registerForPushNotifications() |
Deprecated APIs
Since notifications are now a plugin, we are deprecating the following core APIs:
system.cancelNotification()
→ notifications.cancelNotification()system.scheduleNotification()
→ notifications.scheduleNotification()
These deprecated APIs will eventually be removed, so we recommend that you migrate your code as soon as possible. For your convenience, we have modified these APIs to call through to the new plugin APIs, but you must still include the notification plugin.
Documentation
Please refer to the notification documentation for complete details.
Joe Flowers
Posted at 12:59h, 21 JanuaryLove that we can now wait on requesting push notifications – thanks for this feature!
Jon
Posted at 13:44h, 21 JanuaryWonderful!
Ed Maurina
Posted at 22:10h, 21 JanuaryThis is great news! Thanks!
Juf Jannie
Posted at 09:47h, 22 JanuaryWould have been cool if the push entitlement bug was fixed too. Still getting the error that it is missing after uploading. I know it can be ignored it just is sloppy.
Tom Newman
Posted at 15:38h, 22 JanuaryThere is no “push entitlement bug” that we are aware off. You need to create a provisioning profile that supports Push Notifications to use it. That’s not part of what Corona does.
The issue that the Notification plugin solves is the bogus warning email you get from iTunesConnect when you upload an app that doesn’t use notifications.
Juf Jannie
Posted at 00:20h, 23 JanuaryThat is the warning I mean. It is still in there.
When I upload an app it still tells me I have no push notification
This:
Missing Push Notification Entitlement.
build used was/is 2015.2544
João Marcos
Posted at 07:27h, 13 MarchI received this message: module ‘plugin_notifications’ not found
my corona version is: 3.0 – Build: 2015.2576.
How i donwload this plugin or fix this issue?
Tnks
João Marcos
Posted at 06:43h, 22 AprilI edit “build.settings” file, and fix this!
plugins =
{
[“plugin.notifications”] =
{
publisherId = “com.coronalabs”
},
},
Andrew
Posted at 15:56h, 26 OctoberSomehow this doesn’t work for me. I am following the exact instructions provided but i always get a ‘plugin_notifications not found” error. I’ve tried to find the plugins directory on my OS (mac OS X el captain) but the plugins directory in application support/Corona is empty. I re-installed corona with the latest public release also and still no plugins.