Ios App Handle Push Notification

That is through the apple push notification servers or simply apn servers.
Ios app handle push notification. If your app was running either in the foreground or the background the system notifies your app by calling application didreceiveremotenotification fetchcompletionhandler. If your app wasn t running and the user launches it by tapping the push notification ios passes the notification to your app in the launchoptions of application didfinishlaunchingwithoptions. Be sure to have these capabilities added to your targets.
Moreover on the app target also add background modes. Handle notifications while your app runs in the foreground if a notification arrives when your app is running in the foreground the system delivers that notification directly to your app. In simple words the lifecycle of a remote notification can be summed up as shown next.