cordova-plugin-fcm-with-dependecy-updated icon indicating copy to clipboard operation
cordova-plugin-fcm-with-dependecy-updated copied to clipboard

Push Notification Not Working On iOS with cordova-plugin-fcm-with-dependency-updated .

Open vivekkumarbiswal opened this issue 2 years ago • 7 comments
trafficstars

Hello @andrehtissot & all i am facing problem with push notification with iOS application but its completely working fine with android (i have build an ionic cordova hybrid application). I think the push notification was working fine before i updating iOS 16.1 SDK (xcode 14.3).

Issues i m facing while building: (ionic cordova build ios --configuration production --release)

Screenshot 2023-08-28 at 15 14 27

but when i do edit the pod file with a specific version ~> 7.4.0 (Firebase/Messaging version) and do pod install and then build it again then it got build successfully without any error and all functionality is working perfectly in the application but the push notification is not working.

Note: if i m putting any other versions except 7.4.0 the pod install is getting succeeded but the build is getting failed.

Pod File:

Screenshot 2023-08-28 at 15 12 03

to

Screenshot 2023-08-28 at 16 48 20

pod install:

Screenshot 2023-08-28 at 17 12 49

node version: v14.17.3

npm version 6.14.13

cordova version 11.1.0

ionic version 5.4.16

Pod version(cocoapods) 1.11.2

System: macOS Ventura (13.2.1) Xcode 14.3

Thank you!

vivekkumarbiswal avatar Aug 28 '23 12:08 vivekkumarbiswal

I am also working on a Ionic (hybrid) APP and this plugin is working fine on Android. On IOS it is compiled successfully, but the notifications no more arrive on Apple devices. It was working fine until mid August 2023. Is it anything changed on Firebase side?

carlo318 avatar Aug 29 '23 08:08 carlo318

Hello @carlo318 its the same case with me also. I tired finding on firebase side but didn't get anything there.Please let me know if you get any solution to this issue, It will be a great help.

Thank you !

vivekkumarbiswal avatar Sep 04 '23 09:09 vivekkumarbiswal

Hi @vivekkumarbiswal finally I solved with these 2 actions:

  1. reinstalling the plugin with ALL the parameters suggested in the ReadMe:

ionic 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"

  1. Inserting the explicit request for the Permission to receive the Push Notifications:

const wasPermissionGiven = await FCM.requestPushPermission({ });

If still not working, try removing the platform IOS, remove the plugin, reinstall the plugin, then reinstall the platform IOS.

carlo318 avatar Sep 04 '23 12:09 carlo318

Hi @vivekkumarbiswal finally I solved with these 2 actions:

  1. reinstalling the plugin with ALL the parameters suggested in the ReadMe:

ionic 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"

  1. Inserting the explicit request for the Permission to receive the Push Notifications:

const wasPermissionGiven = await FCM.requestPushPermission({ });

If still not working, try removing the platform IOS, remove the plugin, reinstall the plugin, then reinstall the platform IOS.

Hello @carlo318 i tried reinstalling the plugin its failing and i tried removing platform(ios) and plugin, i m able to install the plugin but while adding platform its giving the same error :

Installing "cordova-plugin-fcm-with-dependecy-updated" for ios Running command: pod install --verbose Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1 at ChildProcess.whenDone (/Users/vivekbiswal/Documents/IOS/Push Notification/website/FSPortal/node_modules/cordova-common/src/superspawn.js:135:23) at ChildProcess.emit (events.js:375:28) at maybeClose (internal/child_process.js:1055:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) pod: Command failed with exit code 1 [ERROR] An error occurred while running subprocess cordova. cordova platform add ios exited with exit code 1. Re-running this command with the --verbose flag may provide more information.

do you know how to resolve this ?

vivekkumarbiswal avatar Sep 05 '23 10:09 vivekkumarbiswal

I am sorry I don't know how to help you, I don't get that error.

carlo318 avatar Sep 05 '23 14:09 carlo318

It got resolved as the issue is not with the plugin its because my app was not using the FCM request push permission, after putting the FCM request push permission its working now.

vivekkumarbiswal avatar Dec 19 '23 19:12 vivekkumarbiswal

It got resolved as the issue is not with the plugin its because my app was not using the FCM request push permission, after putting the FCM request push permission its working now.

Is it working on the Android 13 & the latest iOS? Are you able to receive the Push notification successfully?

kunalSBasic avatar Apr 12 '24 07:04 kunalSBasic