apple-push-notifications

Max number of devices to send to APNS socket sever

馋奶兔 提交于 2019-12-04 09:57:21
Our push notification script that has worked for almost a year has suddenly stopped working. The script does the following: Queries a DB for a list of iPhone device tokens Opens an SSL socket connection to Apple's live APNS server $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', $apnsCert); stream_context_set_option($ctx, 'ssl', 'passphrase', $pass); $fp = stream_socket_client($apnsHost, $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx); creates a payload with a 255 byte sized message $payload = '{ "aps": { "alert": "' . $message . '", "badge": 1, "sound":

Using PHP to send iOS Push Notifications via APNs

时间秒杀一切 提交于 2019-12-04 09:42:41
问题 I have implemented Push-Notifications into my Project and everything works fine so far. I've tried sending Notifications through Pusher and this worked out just fine. But I have to send them through PHP, which isn't working yet. I found many old explanations on how to make this happen, but none of them seem to work for me. This is what I'm trying to work with: // APNs Push testen auf Token $deviceToken = $_GET['key']; // Device-Token // Payload erstellen und JSON codieren $payload['aps'] =

Apple Push Notification in Erlang (or improved in Ruby?)

只愿长相守 提交于 2019-12-04 09:03:01
I currently have an Apple Push Notification running on my server in Ruby. I'd like to get one going in Erlang as I'd like to use a supervisor to keep watch over it. Does anyone have any code that they could help me with? Here's my Ruby code. One thing I do not like about this current implementation is that it does not seem to stay connected - it disconnects 2-3 times a day, and it seems after I reconnect that the first push will not go through: context = OpenSSL::SSL::SSLContext.new context.cert = OpenSSL::X509::Certificate.new(File.read(cert)) context.key = OpenSSL::PKey::RSA.new(File.read

iOS- Apple push notification resend from APNS

可紊 提交于 2019-12-04 09:02:45
From Apple's document I understand that if the device is offline, the APNS holds the last notification and sends it to the device when the device is back online. Is there is any mechanism to avoid that resending? The answer is NO Here is what apple says about it, If APNs attempts to deliver a notification but the device is offline, the notification is stored for a limited period of time, and delivered to the device when it becomes available. Only one recent notification for a particular application is stored. If multiple notifications are sent while the device is offline, each new notification

Apple Multiple Push Notifications not visible in Notifications Tray

早过忘川 提交于 2019-12-04 08:42:38
问题 I basically want to make multiple push notifications in the same application visible in the notification tray in iOS. This scenario works if my data is on while push notification is triggered via APNS, but only the latest one is received in case I am offline and come back after a while. This functionality is affirmed by APNS documentaion. However, this is what worked in WhatsApp: Turned Data Connection OFF Sent some messages to WhatsApp Turned Data Connection ON Saw multiple push

Is it possible to send a “silent” push notification on iPhone (without any alert to the user)?

南笙酒味 提交于 2019-12-04 08:26:49
I need to do it on a chat app to notice the client that there is new data to fetch from the server. I know that technically it is possible with an empty payload (at least on ios 5 device it worked), but can Apple see it as abuse of service or is it OK to do it? And is it technically possible on ios 4 device? Yes, increment only badge number, dont send sound and alert, So, there will be one badge on the App icon. So, here unknowingly the badge number will be incremented to show that something has been recieved when user watches the app icon. But your device won't recive alert or empty payload

IOS unregisterForRemoteNotifications does not work in airplane mode

跟風遠走 提交于 2019-12-04 07:49:40
One of the feature in my app is to unregister user from the remote pushnotification when user logs-out from the app. Is there way I can unregister the app from push notification when user logs out while the device is in airplane(offline) mode? I tried this code but I still receive notifications when I come back online, [[UIApplication sharedApplication] unregisterForRemoteNotifications]; Could some one help how to remove app from notification center when the device is in airplane mode? Apple controls remote push notifications. If you are offline you logically cannot disable it. When Apple

APNS Openssl Connection from PHP for Apple Push Notification?

大憨熊 提交于 2019-12-04 06:20:55
问题 Finally i have sent a notification from my local server to my device. I followed this tutorial http://www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2 and many of the peoples from stack overflow helped me to reach this. I Thank you all my friends. I have one doubt on the server setup. For my local use i have used MAMP for Apache and MySQL servers . Finally i open the ssl from Terminal used certificate.pem and key.pem . Is there any way to open ssl from php script .

Does push notification token changes after application update?

让人想犯罪 __ 提交于 2019-12-04 06:03:06
I am asking about two situations: 1) After we do a regular update from the App Store 2) After we simulate an update, by downloading a current version from a Store and installing & running a new version from within Xcode, does push notification token changes? If changes, how often eg. each time, or from time to time? I ask this, because I was doing some testing, where I want to preserve Documents folder after an update. So this can be easily done like I described above, by downloading the app from the Store, and running a new version from within Xcode. But, I noticed that push notifications

iPhone certificate error in apns sharp A call to SSPI failed

China☆狼群 提交于 2019-12-04 05:54:43
i have a data service hosted in azure from which i am sending notification to iphone but while establishing connection with apns i am getting following error "A call to SSPI failed. The message received was unexpected or badly formatted." i also refered following links for the same error but still getting the error apple push notification with APNS sharp and C# iPhone push server? try { using (TcpClient client = new TcpClient()) { try { client.Connect("gateway.sandbox.push.apple.com", 2195); Logging("TSSLProDi :Connected to Apple"); } catch (Exception ex) { Logging("TSSLProDi :" + ex.Message +