Reputation: 3653
I'm sending push notifications like so:
var items:[APNSNotificationItem] = [.customPayload("body",body),.contentAvailable]
if alert
{
items.append(.badge(badge))
items.append(.alertBody(message))
items.append(.alertTitle(title))
items.append(.sound("default"))
}
let n = NotificationPusher(apnsTopic: Constants.notificationsAppId)
n.pushAPNS(
configurationName: notificationsAppId,
deviceTokens: deviceIDs,
notificationItems: items) {
responses in
LogFile.debug("Notification Result:"+String(describing:responses))
}
It works fine initially, and responses look like this:
Notification Result:[200 OK: ]
but after the service runs for a while, it ends up looking like this
Notification Result:[500 Internal Server Error: Unable to write frame]
And the notification is not sent. Restarting the service makes it okay, again.
What might be causing this issue?
Edit: This also happens on Mac OS X when a local instance has been running without activity for a couple of hours
Upvotes: 1
Views: 76