I'm developing application which is used in closed network.
A gateway can open only port 80 or 443.
I want to know can application receive a push notification or can't in this situation.
According to the following document, port 2197 and 5223 are used to communicate with APNs server.
https://support.apple.com/en-us/HT203609
But 2197 is only used to send, and 5223 can be replaced with 443.
So I think our application can receive push notification via a port 443.
But that closed network is NOT WiFi but special 4G/LTE.
In this case, fallback from 5223 to 443 can't work and application can't receive a push notifications?
A gateway can open only port 80 or 443.
I want to know can application receive a push notification or can't in this situation.
According to the following document, port 2197 and 5223 are used to communicate with APNs server.
https://support.apple.com/en-us/HT203609
But 2197 is only used to send, and 5223 can be replaced with 443.
So I think our application can receive push notification via a port 443.
But that closed network is NOT WiFi but special 4G/LTE.
In this case, fallback from 5223 to 443 can't work and application can't receive a push notifications?
That is correct. The 443 fallback is WiFi only.
In your case, you may want to look at the Local Push Connectivity (https://developer.apple.com/documentation/networkextension/local_push_connectivity) introduced in iOS 14, which is designed to be used in restricted networks. Of course this assumes within this restricted network, you can communicate with all the devices without restrictions.
You can watch the WWDC 2020 session on this here: https://developer.apple.com/videos/play/wwdc2020/10113/
In your case, you may want to look at the Local Push Connectivity (https://developer.apple.com/documentation/networkextension/local_push_connectivity) introduced in iOS 14, which is designed to be used in restricted networks. Of course this assumes within this restricted network, you can communicate with all the devices without restrictions.
You can watch the WWDC 2020 session on this here: https://developer.apple.com/videos/play/wwdc2020/10113/