Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push Notifications not working for iOS 13 #366

Open
SadiquaAnjum opened this issue Oct 21, 2019 · 14 comments
Open

Push Notifications not working for iOS 13 #366

SadiquaAnjum opened this issue Oct 21, 2019 · 14 comments

Comments

@SadiquaAnjum
Copy link

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?

@petarov
Copy link

petarov commented Oct 22, 2019

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 the priority to 10 in order to send alert type push notifications or to 5 for non-alerts.

@fschaefer
Copy link

@petarov
Does your fork work with the mdm payload on iOS 13? If yes, which priority should be set for the mdm payload, 5 or 10?

@petarov
Copy link

petarov commented Oct 22, 2019

@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 with 5.

@fschaefer
Copy link

I've some iPadOS 13 devices that do not respond to push messages from mdm atm. I thought this was related to this...

@SadiquaAnjum
Copy link
Author

Thank you soo much @petarov . Your fork code helped me a lot and i was able to see notifications on my iPhone.

@petarov
Copy link

petarov commented Oct 24, 2019

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.

@fschaefer
Copy link

@petarov
FYI: My problem wasn't related to this library in any way.

@fifiand1
Copy link

fifiand1 commented Mar 5, 2021

@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.

@petarov
Copy link

petarov commented Mar 5, 2021

@fifiand1 Yes, pretty much like Java socket. This library will no longer work after the end of March 2021.

@Solo761
Copy link

Solo761 commented Mar 10, 2021

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.

@petarov
Copy link

petarov commented Mar 10, 2021

@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.

@fschaefer
Copy link

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.

@Solo761
Copy link

Solo761 commented Mar 10, 2021

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 :)

@salake
Copy link

salake commented Apr 29, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants