apple-push-notifications

Apns php error “Failed to connect to APNS: 110 Connection timed out.”

点点圈 提交于 2019-12-01 18:15:45
I have done apns code for php and objective c from this Apns code and setup certificate from this link Sandbox and production apns for sending notification to ios devices is working perfectly on my server.I moved code and same certificate to client server then sending notification is not working. I debug all php code and found that it stops at this line of code private function _connectSSLSocket($development) { $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', $this->apnsData[$development]['certificate']); $this->sslStreams[$development] = stream_socket

When install build from xcode push notification is working but when install ipa it is not working

北城余情 提交于 2019-12-01 18:05:17
I implemented push notification in my app and it is working when i install build from xcode but not working when i install app via a link generated by diawi.com why this is happening? Push apns certificates are different for Development & production if you install from xcode - It uses development certificate if install from diawi.com - It uses production certificate on parse,com i think you have uploaded .p12 file generated from development certificate. you have to upload .p12 file of production certificate & then check. As @sadiqxs notice there are two types of certs, and in a comment you can

stream_socket_client failing on my server with no way to know more about the error

二次信任 提交于 2019-12-01 18:03:32
This code: ( https://github.com/stuffmc/Safari-Push-Notifications/blob/master/index.php#L195 ) stream_socket_client('ssl://gateway.push.apple.com:2195', $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); returns false , but with no errors. It means that when I'm sending to /v1/push it fails for every device/token :( The PHP documentation says: If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket. I have this code running perfectly

stream_socket_client failing on my server with no way to know more about the error

◇◆丶佛笑我妖孽 提交于 2019-12-01 18:01:00
问题 This code: (https://github.com/stuffmc/Safari-Push-Notifications/blob/master/index.php#L195) stream_socket_client('ssl://gateway.push.apple.com:2195', $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); returns false , but with no errors. It means that when I'm sending to /v1/push it fails for every device/token :( The PHP documentation says: If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call

Diagnosing dropped notifications from Azure Notification Hub to APNS

给你一囗甜甜゛ 提交于 2019-12-01 17:57:31
问题 We have a (mostly) successful implementation of push notifications to iOS and Android devices through Azure Notification Hubs. The problem is that some of the iOS devices are apparently never receiving notifications that are sent by Azure Notification Hubs. We use templates and tags to direct the messages to the appropriate devices. The tags are interest topics, and never user-specific, so we're expecting one notification for a tag to be pushed to all devices subscribed to that tag. The

Diagnosing dropped notifications from Azure Notification Hub to APNS

狂风中的少年 提交于 2019-12-01 17:49:10
We have a (mostly) successful implementation of push notifications to iOS and Android devices through Azure Notification Hubs. The problem is that some of the iOS devices are apparently never receiving notifications that are sent by Azure Notification Hubs. We use templates and tags to direct the messages to the appropriate devices. The tags are interest topics, and never user-specific, so we're expecting one notification for a tag to be pushed to all devices subscribed to that tag. The Android devices seem to receive their notifications flawlessly, but the iOS devices are not consistent. Most

When install build from xcode push notification is working but when install ipa it is not working

情到浓时终转凉″ 提交于 2019-12-01 17:48:25
问题 I implemented push notification in my app and it is working when i install build from xcode but not working when i install app via a link generated by diawi.com why this is happening? 回答1: Push apns certificates are different for Development & production if you install from xcode - It uses development certificate if install from diawi.com - It uses production certificate on parse,com i think you have uploaded .p12 file generated from development certificate. you have to upload .p12 file of

Python truncating international string

假装没事ソ 提交于 2019-12-01 17:08:13
I've been trying to debug this for far too long, and I obviously have no idea what I'm doing, so hopefully someone can help. I'm not even sure what I should be asking, but here it goes: I'm trying to send Apple Push Notifications, and they have a payload size limit of 256 bytes. So subtract some overhead stuff, and I'm left with about 100 english characters of main message content. So if a message is longer than the max, I truncate it: MAX_PUSH_LENGTH = 100 body = (body[:MAX_PUSH_LENGTH]) if len(body) > MAX_PUSH_LENGTH else body So that's fine and dandy, and no matter how long of a message I

How to know “topic” name from Firebase notification on iOS

懵懂的女人 提交于 2019-12-01 17:00:57
I'm trying to use Firebase in my iOS application. I successfully integrated it and receiving notifications from all 3 Targets (user segment, topic and single device). My question is how to know a particular notification is received from which topic? I'm following this documentation and this github page EDIT: I'm testing on iOS11.2 (XCode9.2) & my response (userInfo) is: { aps = { alert = test; sound = default; }; "gcm.message_id" = "0:1513282329413512%38894e8e28894e8e"; "gcm.n.e" = 1; "gcm.notification.sound2" = default; "google.c.a.c_id" = 1542306492273623048; "google.c.a.c_l" = test; "google

Python truncating international string

萝らか妹 提交于 2019-12-01 16:26:51
问题 I've been trying to debug this for far too long, and I obviously have no idea what I'm doing, so hopefully someone can help. I'm not even sure what I should be asking, but here it goes: I'm trying to send Apple Push Notifications, and they have a payload size limit of 256 bytes. So subtract some overhead stuff, and I'm left with about 100 english characters of main message content. So if a message is longer than the max, I truncate it: MAX_PUSH_LENGTH = 100 body = (body[:MAX_PUSH_LENGTH]) if