apns-php

Apple Wallet Not Auto Updating Pass

醉酒当歌 提交于 2019-12-31 04:52:05
问题 Finally im able to push new changed compiled bundle. There is one issue im facing in order to see new changes. i have to go in my wallet card & disable "Automatic updates" then enable. then i can see my new compiled pass card. $result = $pdo->query($query); if($result->rowCount() > 0) { $myPass = $result->fetch(); $data = $myPass['data']; $nameFile = 'passbook_'.time().'.pkpass'; file_put_contents($nameFile, $data); $stream = function () use ($nameFile) { readfile($nameFile); }; return $app-

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

末鹿安然 提交于 2019-12-30 18:56:14
问题 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

APNS: invalid token (8)

こ雲淡風輕ζ 提交于 2019-12-30 02:56:08
问题 I am using the apns php server provided at https://code.google.com/p/apns-php/. I've have set up th push notification certificate but my code still throws an error on connect. What is wrong with this? Here is how I get the device token: - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { #if !TARGET_IPHONE_SIMULATOR // Prepare the Device Token for Registration (remove spaces and < >) NSString *deviceToken = [[[[devToken

ApnsPHP: Push notifications working in development but not in production

不打扰是莪最后的温柔 提交于 2019-12-28 06:51:05
问题 Yes: there are many duplicates to this question, but none of the answers helped. I am following this great tutorial by Ali Hafizji on using APNS service for push notifications. Testing APNS in development mode : download aps_development.cer export the private key for the certificate ( aps_development_key.p12 ) Then I combined the two using following commands (using terminal): openssl x509 -in aps_development.cer -inform der -out aps_development.pem openssl pkcs12 -nocerts -out aps_development

Some Devices Not Receiving Apple Push Notifications

可紊 提交于 2019-12-20 21:00:38
问题 I am using Apples iOS Enhanced Notification Format to send push notification in bulk, and using the PHP solution described in this post: https://stackoverflow.com/a/10059000/300129 The experience at this point is that when I send a push notification, some devices are receiving the message and some devices are not. The results are inconsistent. Sometimes device X will receive a notification and sometimes device X will not. I am logging everything and I am not getting any error responses. Any

Push notifications delivered to apple apns server but device received nothing

旧时模样 提交于 2019-12-13 12:27:22
问题 Development environment: iOS 9.3.2 (iPh6ne 6+) ... but it works on iOS 8.x Phonegap 6.2.7 Phonegap-plugin-push v1.7.2 PHP7 (server side)- contentpush - ref My situation: the token was delivered to my server automatically message sent to ssl://gateway.push.apple.com 2195 successfully nothing received in device even alert("") push.on('notification', function(data) { console.log(data.message); alert(""); alert(data.title+" Message: " +data.message); }); 回答1: Apple doesn't give any guarantee on

iOS push notifications only showing badges. need sounds and banners too

浪尽此生 提交于 2019-12-13 06:07:33
问题 I am currently sending push notifications to 2 different apps using the same methods, but one of them only shows only Badges . If I visit Notifications from Settings it displays only " Badges " instead of "Badges, Sounds, Banners" . I am using the https://github.com/phonegap/phonegap-plugin-push plugin. I tried reseting so it would ask for first time push request, tried another device, and repeatedly called the plugins init function which calls [[UIApplication sharedApplication]

500 Error when sending a lot of push notifications, PHP?

爱⌒轻易说出口 提交于 2019-12-13 05:12:30
问题 I'm using the following code to cycle through a database containing the device ID's that my ios app collects. At around 300 or so notifications my server freezes in a 500 error. Any ideas how I can do this more efficiently? I am on a shared server; would my only option be to set this up on a dedicated machine? php.ini has the following set - set_time_limit = 999999999 max_execution_time = 999999999 memory_limit = 512M Here's the code - if(isset($_POST['pushNotify'])){ /// PROCESS PUSH

APNS: Invalid token causes all subsequent push notifications to fail

好久不见. 提交于 2019-12-12 04:44:08
问题 I'm using the Sly PHP Push Notification library, but the same thing happens whether I send all my push notifications completely manually, without the library (like in the script below). If there is an invalid token in my SQL database and I attempt to send a push to that token, I am disconnected from ssl://gateway.push.apple.com:2195 and all the subsequent tokens do not receive the push. How can I either spot invalid tokens and remove them from my database, or continue to send out pushes after

About the apple Enhanced notification format

谁说我不能喝 提交于 2019-12-11 17:14:00
问题 I use php to send push message to apns , i use "Enhanced notification format" to sent .. but i can not get the return" Codes in error-response packet" anyone can help me ?? here is my code <?php header("Content-Type: text/html; charset=UTF-8"); $deviceToken = "123"; $content = "testing"; if(isset($content)) { $newContent=substr($content,0,30)."..."; $re_content=iconv("GB2312","UTF-8",$newContent); $pass = 'Ladder'; $body = array("aps" => array("alert" => $re_content, "badge" => 1, "sound" =>