Dear Rob,
I have the a problem with the push notification in iOS. (Android is OK)
I have no problem when push notification is not a plugin. I have two apps working.
However, when I using build 2016.2865 the iOS notificationListener(event) can not get any event
here is the code in main.lua
--================================================ notifications = require( "plugin.notifications" ) if system.getInfo("platformName") == "iPhone OS" then notifications.registerForPushNotifications() end local function notificationListener( event ) print( "Notification EVENT" ) if event.type == "remoteRegistration" then print("Push Notification Token:",event.token) -- I will try to send the token back to my own server here elseif event.type == "remote" then elseif event.type == "local" then end end Runtime:addEventListener( "notification", notificationListener ) --================================================
I try same code on Android and iOS
on Android, both
print( “Notification EVENT” )
print(“Push Notification Token:”,event.token)
worked!
but on iOS, both
print( “Notification EVENT” )
print(“Push Notification Token:”,event.token)
can not be reached! not working.
I do setup config.lua and build.settings correctly
Can you help me to solve the problem?
BOB