Not receiving any push notification in iPhone
BE AWARE OF THE BATTERY ISSUE, WHICH BLOCKS YOU FOR ONE DAY OR MORE
Never start testing pushes in development mode (tethered phone) unless the phone is FULLY CHARGED.
https://developer.apple.com/library/archive/technotes/tn2265/_index.html
If your notification payload contains the content-available key, your app will receive the notification if iOS or OS X determines it is energy-efficient to do so. If the energy or data budget for the device has been exceeded, your app will not receive any more notifications with the content-available key until the budget has been reset. This occurs once a day and cannot be changed by user or developer action.
In general, notifications (particularly when you are tethered) are incredibly flakey regarding battery state of the phone. (Also, some of the stuff mentioned in that article, which is very old, is plain wrong.) Basically you often JUST WILL NEVER GET notifications if your phones enter "don't get notifications because of battery" mode - and it can go on for days.
Notifications do (or did) prefer cellular WTF!!!
On iOS, push notifications use the cellular data network whenever possible, even if the device is currently using Wi-Fi for other network activity such as web browsing or email. However, the push service will fall back to Wi-Fi if cellular data service isn't available.
This has changed a lot with different iOS versions but it's a huge hassle.
>>>>> !!! CRITICAL TIP !!! <<<<<
Don't forget that:
Build to a tethered phone. You will only get the "sandbox, development" push notifications. BUT THOSE BARELY WORK - THEY ARRIVE VERY LATE, DO NOT WORK IN SOME REGIONS, AND SO ON. THEY ARE SO FLAKEY THEY ARE USUALLY NOT WORTH TRYING.
Increase build number, build normally for Test Flight, send to test flight, and then install from Test Flight. You will now get CORRECT, NORMAL APPLE PUSH NOTIFICATIONS.
Very confusingly you !!DO!! get REAL push notifications on development Test Flight builds.
That is to say - when you build to TestFlight you DO GET exactly the same "real" push notifications as for actual apps published on the app store and used by your public users - real, true, APNS push notifications.
The incredibly confusingly-named "development, sandbox" push notifications are ONLY for "tethered phone builds". (AND, to add confusion on confusion, the "development, sandbox" push notifications are very unreliable, so you never really know if they are working or not.)
Read more here! https://stackoverflow.com/a/60550859/294884
You will not receive Push only in 2 cases
1.) If your application is in foreground.
2.) you device token is not valid for receiving the push notification please check both the condition if you still do not receive push please let me know. Thanks