applicationReceivedRemoteMessage only executes in foreground
<p>my project uses Firebase Notifications as its APNs service, but I have been using the Firebase Console to send notifications to my device as a test, and they only show up (through Console Output) in the foreground. When the app is in the background or the device is in the lock screen, no notifications come to the device. Console output, however, does finally arrive from the applicationReceivedRemoteMessage method when I open the app back up. </p>

<pre><code>func applicationReceivedRemoteMessage(_ remoteMessage: FIRMessagingRemoteMessage) {

        print("%@", remoteMessage.appData)
        print("QQQQQ")
    }
</code></pre>

<p>Example Output:</p>

<pre><code>%@ [AnyHashable("notification"): {
    body = Hi;
    e = 1;
}, AnyHashable("from"): 492525072004, AnyHashable("collapse_key"): org.myApp]
QQQQQ
</code></pre>