Uncaught module com.pushwoosh.plugins.pushwoosh.PushNotification not found"

Comments

4 comments

  • Avatar
    Nikolai Polkhovskiy

    Hi!

    Could you please try our Sample Application and see whether the issue is reproducible?

    Here is the link to our Sample app:

    https://github.com/Pushwoosh/pushwoosh-phonegap-cordova-sample

  • Avatar
    AhmedShady

    Change your plugin require to

    var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");

    instead of

    var pushNotification = cordova.require("com.pushwoosh.plugins.pushwoosh.PushNotification");

  • Avatar
    victor

    If I use Cordova iOS 4.0.1 (from PhoneGap Build cli-6.0.0) It won't work using pushwoosh-cordova-plugin.PushNotification with plugin version 4.2.2. I've downgraded to plugin 4.2.0 and "com.pushwoosh.plugins.pushwoosh.PushNotification"

  • Avatar
    Support

    dear all

    the problem has been solved , i think the problem because the code that indicate the OS of mobile with this line :-

    var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");
        if (device.platform == "Android") {
            registerPushwooshAndroid();
        }
    
        if (device.platform == "iPhone" || device.platform == "iOS") {
            registerPushwooshIOS();
        }
    
        if (device.platform == "Win32NT") {
            registerPushwooshWP();
        }
    
        if (device.platform == "windows") {
            registerPushwooshWindows();
        }
    

    so i used my own code to indicate the ios and here is the code :

    var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");
        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
        if( userAgent.match( /iPad/i ) || userAgent.match( /iPhone/i ) || userAgent.match( /iPod/i ) )
            {
    
                    //alert("this is iphone");
            registerPushwooshIOS();
    
            }else if( userAgent.match( /Android/i ) )
            {
                //alert("this is android");
                registerPushwooshAndroid();}
    }
    

    just change the old code with this one , for any support or help please write here

Please sign in to leave a comment.