Mike Keskinov
Mike Keskinov

Reputation: 11908

Safari website notification not working (PushSharp)

I'm using PushSharp library for pushing iOS notifications (it's live for last half year) and now I'm trying to extend functionality to new Mac OS Maverick feature (https://kandutech.net/) . Seems that PushSharp (https://github.com/Redth/PushSharp) doesn't currently support this feature, so I extended PushSharp library myself.

Seems like URL (gateway.push.apple.com:2195) the same as for iOS Distribution, but the JSON payload is slightly different. I adjusted JSON format. Don't see other difference in Pushing process. Did I miss something?

Still can't make it works. I'm getting permission, device token, the pushing process on server side looks fine (no errors occurred), but nothing pops up in Notification Center. Any ideas?

Upvotes: 3

Views: 687

Answers (1)

Mike Keskinov
Mike Keskinov

Reputation: 11908

It turns out that url-args must be presented even if no url arguments needed. I missed it. This payload works:

{"aps":{"alert":{"title":"GAGARIN","body":"POEHALI!!!!"},"url-args":[]}}

Decided do not remove the question, hope it can help somebody.

Upvotes: 4

Related Questions