andrehtissot/cordova-plugin-fcm-with-dependecy-updated

Only receive notification when app is in the foreground (iOS)

ILABUTK opened this issue · 1 comments

I use Cordova to wrap a Quasar VueJS App. Strangely, I can only receive the notifications when the App is in the foreground. I tried in dev mode in XCODE; also, I even published the app to the App Store. Under both test flight and the actual downloaded app, I can only see the notifications while the app is running in the foreground.

XCODE: Version 14.0.1 (14A400)
This is the plugin version that I used:

 cordova plugin add cordova-plugin-fcm-with-dependecy-updated \
  --variable ANDROID_DEFAULT_NOTIFICATION_ICON="@mipmap/ic_launcher" \
  --variable ANDROID_FIREBASE_BOM_VERSION="26.0.0" \
  --variable ANDROID_GOOGLE_SERVICES_VERSION="4.3.4" \
  --variable ANDROID_GRADLE_TOOLS_VERSION="4.1.0" \
  --variable IOS_FIREBASE_MESSAGING_VERSION="~> 7.4.0"

In my case, I encountered the issue when I set the android target to API level 31. Setting the ANDROID_FCM_VERSION to 21.1.0 fixed the problem.