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

Google FCM Push Notifications Cordova Plugin
MIT License
209 stars 277 forks source link

OnNotification not fire in ios device foreground and background #107

Closed andrehtissot closed 4 years ago

andrehtissot commented 4 years ago

Package.json:

{
  "name": "NewAppy",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/fcm": "^4.20.0",
    "@ionic-native/native-storage": "^4.20.0",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic-native/toast": "^4.20.0",
    "@ionic/storage": "2.1.3",
    "cordova-android": "^8.0.0",
    "cordova-ios": "^5.1.1",
    "cordova-plugin-apprate": "^1.1.11",
    "cordova-plugin-console": "^1.0.2",
    "cordova-plugin-device": "^2.0.1",
    "cordova-plugin-dialogs": "^2.0.2",
    "cordova-plugin-fcm-with-dependecy-updated": "^6.4.3",
    "cordova-plugin-geolocation": "^2.1.0",
    "cordova-plugin-image-picker": "^1.1.0",
    "cordova-plugin-inappbrowser": "^3.2.0",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^4.1.3",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.1.1",
    "cordova-plugin-transport-security": "^0.1.1",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "^5.0.10",
    "ion-multi-picker": "^2.1.2",
    "ionic-angular": "3.9.2",
    "ionic-calendar-date-picker": "^0.1.2",
    "ionicons": "3.0.0",
    "node-gyp": "^5.0.3",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "cordova-plugin-apprate": "^1.5.0",
    "node-sass": "^4.12.0",
    "typescript": "2.4.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-console": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-image-picker": {},
      "cordova-plugin-x-socialsharing": {},
      "cordova-plugin-geolocation": {},
      "cordova-plugin-transport-security": {},
      "cordova-plugin-nativestorage": {},
      "cordova-plugin-apprate": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-fcm-with-dependecy-updated": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  }
}

Originally posted by @omicronsrl in https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/106#issuecomment-645187943

caiquesantosteixeira commented 4 years ago

same problem!

omicronsrl commented 4 years ago

Hi team, I wanted to report that I published the app on the appstore and once downloaded the push works. While on XCODE no.

Thanks Marco

andrehtissot commented 4 years ago

Yes, Push notifications only works locally with a special certificate (https://customersupport.doubledutch.me/hc/en-us/articles/229495568-iOS-How-to-Create-a-Push-Notification-Certificate). Otherwise only from builds installed from TestFlight or Apple Store. Apple's rules.

DaedalusAB commented 4 years ago

Hi @andrehtissot I've spent some hours trying to figure this out. Could you please include a pointer about this in the github readme (for me, it wasn't common knowledge)

Thank you!

andrehtissot commented 4 years ago

@DaedalusAB Good idea. I've added as https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/blob/master/README.md#push-notifications-on-ios