Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

on registration callback getting called repeatedly. #353

Closed
efanurag opened this issue Nov 18, 2015 · 10 comments
Closed

on registration callback getting called repeatedly. #353

efanurag opened this issue Nov 18, 2015 · 10 comments
Labels

Comments

@efanurag
Copy link

I put a console in handler for registration success. which is printing repeatedly.

@macdonst
Copy link
Member

@efanurag not even close to enough information for a meaningful answer.

@efanurag
Copy link
Author

@macdonst Sorry for bothering you with in sufficient information.

I have written a JavaScript function which is supposed to call when the registration request for receiving cloud notification for ios is successful.

This callback function is getting called repeatedly like it is called in loop on iOS. Though the same function is working fine on Android and is called only once for GCM registration.

@macdonst
Copy link
Member

@efanurag what version of the plugin are you using? What version of iOS is exhibiting this problem? Can you show your code?

@kishorpawar
Copy link

@macdonst I just added plugin to app by
Cordova plugin add .

On deviceready event I am doing

var push = Pushnotification.init();

push.on('register', onRegister);
push.on('notification', onNotification);

and onRegister is defined as follow.

function onRegister(data){
console.log(data);
}

Now data is getting printed indefinitely.

Please bear with me, I am writing this on my phone and I am off to work, so whatever I can recall I wrote it here.

Hope you understand the problem I am facing.

@kishorpawar
Copy link

Ios version is 9.1

@kishorpawar
Copy link

phonegap-plugin-push 1.4.2 "PushPlugin"

@kishorpawar
Copy link

Simon happy to say that your plugin is fine, the culprit is another Cordova plugin.

@macdonst
Copy link
Member

@kishorpawar & @efanurag can this issue be closed then?

Also, what is the other plugin causing the issues?

@kishorpawar
Copy link

Yes, You can close this issue.

Somehow the callback for onRegister was getting called indefinitely when we add that plugin.

The plugin clevertap-cordova

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants