Hello,
I'm experimenting with silent notifications, i.e. the ones with just "content-available" : 1. Fter a while in which the notifications were rejected due to a mysterious fault with my connectivity, (see here) and following a suggestion on a forum, I've reset settings on my iOS 11.2.5 beta.
Now as I send a silent push notification, I got a different error, and it's the same on a iOS 11.2 (non beta). The push notification is not delivered to the app, eve if it is received by the phone.
The log is
Dec 27 10:11:30 iPierX SpringBoard(UserNotificationsServer)[59] <Notice>: [it.my.app.dev] Received remote notification request C146-3838 [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 ]
Dec 27 10:11:30 iPierX SpringBoard(UserNotificationsServer)[59] <Notice>: [it.my.app.dev] Deliver push notification request C146-3838
Dec 27 10:11:30 iPierX SpringBoard(UserNotificationsServer)[59] <Notice>: [it.my.app.dev] Passing content-available push to Duet
Dec 27 10:11:30 iPierX SpringBoard(DuetActivityScheduler)[59] <Notice>: SUBMITTING: <private>
Dec 27 10:11:30 iPierX SpringBoard(UserNotificationsServer)[59] <Error>: Ignoring notification with no alert, sound or badge (it.my.app.dev): C146-3838
Dec 27 10:11:30 iPierX SpringBoard(UserNotificationsServer)[59] <Notice>: [it.my.app.dev] Not saving push notification C146-3838 to store [ error=Error Domain=UNErrorDomain Code=1401 "Notification has no user-facing content" UserInfo={NSLocalizedDescription=Notification has no user-facing content} ]
Dec 27 10:11:30 iPierX dasd(DuetActivitySchedulerDaemon)[1645] <Notice>: Submitted Activity: com.apple.pushLaunch.it.my.app.dev:EA2367 <private>
Dec 27 10:11:30 iPierX dasd(DuetActivitySchedulerDaemon)[1645] <Notice>: Daemon Canceling Activities: {(
com.apple.pushLaunch.it.my.app.dev:EA2367
)}
Dec 27 10:11:30 iPierX dasd(DuetActivitySchedulerDaemon)[1645] <Notice>: CANCELED: com.apple.pushLaunch.it.my.app.dev:EA2367 <private>
As far as I can tell, sometimes it works (i.e. if the app is in the foreground) so the payload should be ok. It's like this
{
"aps" : {
"content-available" : 1,
},
"acme1" : "bar",
"acme2" : 42,
"type" : "0"
}
Any hint as to what I am missing?
Thanks
Walter