Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 140 forks source link

push-notification and push-receive not fired on ios Local notification #335

Open mohamedMobileSpot opened 4 years ago

mohamedMobileSpot commented 4 years ago

Plugin version "pushwoosh-cordova-plugin": "7.18.11"

Cordova:

"cordova-android": "^9.0.0", "cordova-ios": "^6.1.1", "cordova-plugin-whitelist": "^1.3.4" "cordova-plugin-transport-security": "0.1.2",

System:

ios-deploy : 1.10.0 NodeJS :v10.16.3 npm : 6.9.0 OS : macOS Catalina 10.15.6 Xcode : Version 11.7 (11E801a)


To reproduce : you need to fire on ios device a local notification

pushNotification.createLocalNotification(
      {
        msg: document.getElementById("inputTitle").value || "test",
        seconds: document.getElementById("inputTime").value
          ? parseInt(document.getElementById("inputTime").value, 10)
          : 3,
        userData: {},
      },
      function (success) {
        console.log("createLocalNotification success ");
        console.info(JSON.stringify(["successeed to register ", success]));
      },
      function (error) {
        console.info("createLocalNotification error ");
        console.warn(JSON.stringify(["failed to register ", error]));
      }
    );

when the local notification trigger and user tap on it the two event push-notification and push receive not fired on ios but with push notification this two event there are fired correctly


config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.mobileSpot.bk" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>BkApp</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <access origin="*" />
    <access origin="*.pushwoosh.com" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <plugin name="pushwoosh-cordova-plugin">
        <variable name="LOG_LEVEL" value="DEBUG" />
        <variable name="IOS_FOREGROUND_ALERT_TYPE" value="BANNER" />
        <variable name="ANDROID_FOREGROUND_PUSH" value="false" />
    </plugin>
    <platform name="android">
        <allow-intent href="market:*" />
        <resource-file src="google-services.json" target="app/google-services.json" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <config-file parent="NSAppTransportSecurity" target="*-Info.plist">
            <dict>
                <key>NSAllowsArbitraryLoads</key>
                <true />
            </dict>
        </config-file>
    </platform>
</widget>

package.json


{
  "name": "-------------", // i removed for security
  "displayName": "BkApp",
  "version": "1.0.0",
  "description": "A sample Apache Cordova application that responds to the deviceready event.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start-android": "cordova build android && cordova run android --device",
    "start-ios": "cordova build ios && cordova run ios --device"
  },
  "keywords": [
    "ecosystem:cordova"
  ],
  "author": "Apache Cordova Team",
  "license": "Apache-2.0",
  "devDependencies": {
    "cordova-android": "^9.0.0",
    "cordova-ios": "^6.1.1",
    "cordova-plugin-whitelist": "^1.3.4"
  },
  "cordova": {
    "plugins": {
      "pushwoosh-cordova-plugin": {
        "LOG_LEVEL": "DEBUG",
        "IOS_FOREGROUND_ALERT_TYPE": "NONE",
        "ANDROID_FOREGROUND_PUSH": "false"
      }
    },
    "platforms": [
      "android",
      "ios"
    ]
  },
  "dependencies": {
    "cordova-plugin-transport-security": "0.1.2",
    "pushwoosh-cordova-plugin": "7.18.11"
  }
}
wfhm commented 4 years ago

These callbacks are designed to work with push notifications only. We have put adding callbacks for the plugin-generated local notifications in our roadmap, however, there is no clear ETA on it so far. This issue will be updated as soon as there is any progress.

mohamedMobileSpot commented 4 years ago

These callbacks are designed to work with push notifications only. We have put adding callbacks for the plugin-generated local notifications in our roadmap, however, there is no clear ETA on it so far. This issue will be updated as soon as there is any progress.

thank you for your support

mohamedMobileSpot commented 3 years ago

any update on this ?

wfhm commented 3 years ago

@mohamedMobileSpot,

No updates so far, we have this task in our backlog, but we have not started working on it yet.

mohamedMobileSpot commented 3 years ago

any update on this