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

First notification do not come to device #19

Closed
GoogleCodeExporter opened this issue Apr 23, 2015 · 4 comments
Closed

First notification do not come to device #19

GoogleCodeExporter opened this issue Apr 23, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I've found a problem- when my script is running (and keeping connection with 
apns server) for a several hours without sending any notification, when I do 
first sendNotification - it says "Attempt failed... trying 
again" (PushNotificationManager.java line 152), and then send notification 
(second attempt). But problem is what this notification DO NOT get to 
device. Second and others- all ok. 

Original issue reported on code.google.com by a.baigo...@gmail.com on 19 May 2010 at 9:04

@GoogleCodeExporter
Copy link
Author

This is probably not the answer you want... 

"Don't maintain a 24x7 connection to the APNServers... maintaining connections 
is bad and will probably get 
your key revoked."

Say there are 100 connections available to the APNServers, and there were 100 
iPhone app servers connected 
to the APNS 24x7, then NO ONE else would be able to send messages. 

Or do you think Apple should provide 1 connection for every app ever built?

The retry code may have issues, but what you are doing is still wrong.

Bill

Original comment by idbill.p...@gmail.com on 20 May 2010 at 8:24

@GoogleCodeExporter
Copy link
Author

Thank you for reply, but where you found what "maintaining connections is bad 
and 
will probably get your key revoked"? Apple documentation says: 

"The provider connects with APNs through a persistent and secure channel while 
monitoring incoming data intended for their client applications. When new data 
for 
an application arrives, the provider prepares and sends a notification through 
the 
channel to APNs, which pushes the notification to the target device." 
and 
"You should also retain connections with APNs across multiple notifications. 
APNs 
may consider connections that are rapidly and repeatedly established and torn 
down 
as a denial-of-service attack. Upon error, APNs closes the connection on which 
the 
error occurred.". 


Original comment by a.baigo...@gmail.com on 21 May 2010 at 8:12

@GoogleCodeExporter
Copy link
Author

Yes, 'You should also retain connections with APNs across multiple 
notifications.' But that doesn't mean hold 
open the connection unused for hours at a time.

Original comment by idbill.p...@gmail.com on 21 May 2010 at 3:28

@GoogleCodeExporter
Copy link
Author

Original comment by idbill.p...@gmail.com on 16 Oct 2010 at 9:37

  • Changed state: Invalid

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

No branches or pull requests

1 participant