Push Notifications not working for iOS 13
Java Apple Push Notification Service Provider
Brought to you by:
magnihotri93
Originally created by: SadiquaAnjum
Push notifications are not working once we update our iphones to iOS version 13.
looks like some changes are required in order to support version 13.
https://onesignal.com/blog/ios-13-introduces-4-breaking-changes-to-notifications/
What changes do we have to implement along with to support version 13?
Originally posted by: petarov
You should probably migrate to pushy. It supports Apple's new HTTP/2 APNs protocol and the new iOS 13 header requirements are supported with v0.13.10.
If you can't migrate right now, you can try to use my java-apns fork. You'll have to build it yourself. I have extended the push call with a
priority
parameter. Set thepriority
to10
in order to send alert type push notifications or to5
for non-alerts.Originally posted by: fschaefer
@petarov
Does your fork work with the mdm payload on iOS 13? If yes, which priority should be set for the mdm payload,
5
or10
?Originally posted by: petarov
@fschaefer I don't use priority for
mdm
notifications. So far they seem to work well without it, at least on my side. Otherwise, I would try with5
.Ticket changed by: SadiquaAnjum
Ticket changed by: SadiquaAnjum
Originally posted by: fschaefer
I've some iPadOS 13 devices that do not respond to push messages from mdm atm. I thought this was related to this...
Originally posted by: SadiquaAnjum
Thank you soo much @petarov . Your fork code helped me a lot and i was able to see notifications on my iPhone.
Originally posted by: petarov
Great to hear that @SadiquaAnjum!
Be advised that Apple plans to discontinue the old protocol sometime in the middle of 2020. Upgrading to another lib is highly recommended.
Originally posted by: fschaefer
@petarov
FYI: My problem wasn't related to this library in any way.
Originally posted by: fifiand1
@petarov
Apple announced that "legacy binary protocol" will be not supported.
I know HTTP/2 is a binary protocol.
My question is what is "legacy" binary protocol.
Like Java Socket?
Looking forward to your apply.
Originally posted by: petarov
@fifiand1 Yes, pretty much like Java socket. This library will no longer work after the end of March 2021.
Originally posted by: Solo761
Does that include your fork or only this one?
Sorry if this question is stupid. I have one legacy service that I "inherited" and it seems to use your fork (1.0.0.Beta6, this one goes to Beta3 and your goes to Beta6). Haven't actually worked with apple notifications.
Originally posted by: petarov
@Solo761 This includes my fork as well.
The java-apps lib implements the legacy APNS protocol, whereas the new APNS protocol is HTTP/2 based. You need to use a different library.
Depending on your use-case, you could also implement a simple HTTP/2 POST call yourself. Apple's docs are quite helpful on that matter: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns.
Originally posted by: fschaefer
Some devs might have to migrate away from java-apns in near future, so maybe I may recommend Pushy here. We migrated last year without any problems. There is even a migration guide for java-apns here.
Originally posted by: Solo761
OK, thanks to both!
Guess it's time to switch iOS notifications to firebase, it already uses it for android portion so it's probably less work to implement it for iOS than to switch to new library.
But I'll check fschaefer migration guide, maybe that'll be an option too. Situation with this project is kinda complicated at the moment :)
Originally posted by: salake
Hi! java-apns still works for me, push notifications are getting sent out. So I guess that Apple still supports java-apns even though they said they would revoke their support after 31th of March?