Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mohamedMobileSpot opened this issue Sep 7, 2020 · 5 comments
Labels

Comments

@mohamedMobileSpot
Copy link

mohamedMobileSpot commented Sep 7, 2020

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="[email protected]" 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 wfhm added the 53198 label Sep 7, 2020
@wfhm
Copy link
Member

wfhm commented Sep 16, 2020

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
Copy link
Author

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
Copy link
Author

any update on this ?

@wfhm
Copy link
Member

wfhm commented Feb 24, 2021

@mohamedMobileSpot,

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

@mohamedMobileSpot
Copy link
Author

any update on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants