Push Notification doesn't call didReceiveRemoteNotification swift

I have implemented Push Notification using FCM.
When my app is in the foreground and a notification arrive then didReceiveRemoteNotification method is called but when the app is not active it doesn't call this method

I am checking this by setting a bool value to true when app is in background but doesn't change the bool it means it doesn't execute this line..
Here is my method.

you must have write the correct spelling and character placement in Notification Payload.
As per your statement you might have place incorrect character in content available place.
Please send your payload in this format..