I’m trying to get notifications to work and they appear to be getting scheduled as my badge icon changes at the right time but I don’t get a popup at all. I have my iPhone connected to my my Mac when I’m testing and when I look at the console log in xcode right when the notification should fire, I see this message:
BBServer: No data provider found for section <MyAppName>. Ignoring bulletin
where MyAppName is the name of my app
A couple of thoughts I had: 1) I’m using custom URLs but I removed those and still can’t get it to work. 2) the options were locally declared in the notification setting function but, when I removed them and made them global to main, it still didn’t work.
I’ve noticed that I don’t have a custom sound like the corona example but would rather use the default…hope that’s not a problem.
Any thoughts on why my notification isn’t working? Code snippets below
--- My code, options is global in main local options = { alert = "XXXXX XXXX XXXXX", badge = 0, custom = { msg = "XXX XXXX XXX" }, } --- Setting the notification local currTime = os.date( "!\*t") currTime.min = currTime.min + 2 currTime.sec = 0 local badgeNum = 0 options.badge = badgeNum + 1 local notificationID = system.scheduleNotification( currTime, options ) if not notificationID then statusMsg("Couldn't get a notification scheduled.") else print("Scheduled notification for ",currTime) end -- The notification event handler local onNotification = function( event ) print( event.name ) -- ==\> "notification" if event.custom then statusMsg( "Got a notification to "..event.custom.msg ) native.setProperty( "applicationIconBadgeNumber", 0) end end --- The event handler install Runtime:addEventListener( "notification", onNotification )