Use Firebase for sending and receiving messages with Background Task Extension which will make it work in background and when the message is recived then send notification through
1st try it on your own and then if you have some issue then knock us on community