Open artpolikarpov opened 7 years ago
I'll gladly take a pr improving documentation,
Hello @artpolikarpov, Where did you added this line in the Push.send(). I added it to
apn: {
contentAvailable: 1
}
and as
contentAvailable: 1
With no luck.
I was having the same problem on iOS when starting cold (app is not open or in the background). The startup
listener was not getting called. Worked fine for Android from cold, and for both iOS and Android when warm (in the background).
This gave me a clue, then I looked at this section of the phonegap-plugin-push docs and it made it more clear. You have to add content-available: 1
to your Push.send()
like:
Meteor.methods({'serverNotification'(title, text) {
Push.send({
title,
text,
from: 'server',
badge: 1,
'content-available': 1,
query: {}
});
}
});
@carpmike should it be on default or should it be part of the configuration?
@raix I think to be consistent with phonegap-plugin-push
it should be part of the payload and not configured. Probably best to add something about it to the docs and just link to the explanation in the phonegap-plugin-push
docs (I linked to it in the last post).
Oh, no! I fixed it with
contentAvailable:1
in notification object. I think we should somehow document it.