Find Jobs
Hire Freelancers

Write some Software

₹1500-12500 INR

Закрито
Опублікований over 7 years ago

₹1500-12500 INR

Оплачується при отриманні
We have developed an iOS App on Ionic Framework. The server side code is in PHP. We are not able to send push notification through PHP API to APNS server ( on iPhone device ). Analysis : We have investigated our side that required ports (2195 and 2196) are open, firewall is enabled at hosting site. We have generated .pem file and Device token on client side and tested successfully using java api but facing issue with php api. We received response by using PHP code - Connection timeout We need to solve this issue ASAP. PHP Code : $deviceToken ='ji78c2433a76b2d977a4abe0f01306dd956ac4c4a3679a70b95d'; $passphrase = '**********'; $message = 'hi ...its a test push'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', '[login to view URL]'); stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase); // Open a connection to the APNS server $fp = stream_socket_client( 'ssl://[login to view URL]', $error, $errorString, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx); if (!$fp) { echo 'Iphone Notification : Failed to connect:-'.$errorString; // echo 'not Connected to APNS'.PHP_EOL; } else { // Create the payload body $body['aps'] = array( 'alert' => $message, 'sound' => 'default', "badge"=> 1 ); // Encode the payload as JSON $payload = json_encode($body); // Build the binary notification $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload; // Send it to the server $result = fwrite($fp, $msg, strlen($msg)); if (!$result) echo 'Iphone Notification : Message not delivered'; else echo 'Iphone Notification : Message delivered'; // Close the connection to the server fclose($fp); }
ID проекту: 11541832

Про проект

5 пропозицій(-ї)
Дистанційний проект
Активність 8 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
5 фрілансерів(-и) готові виконати цю роботу у середньому за ₹19 853 INR
Аватарка користувача
Hello Sir, We have Experienced Developers team in ionic. We are interested to work with you. Thanks, Vijay Thakor
₹16 111 INR за 2 дні(-в)
5,0 (4 відгуки(-ів))
3,1
3,1
Аватарка користувача
I have 20+ years of experience working on Linux, Networking, shell scripting, various programming languages and related application frameworks. I have lead team who have developed mobile apps on Android and iOS platform for my corporate clients. I have been instrumental in publishing couple of those apps on Apple App Store, thoroughly aware of pain points in publishing the applications. I have long track record of working on, obvious but difficult to diagnose problems. The code you have posted is pretty boiler plate code from the online blogs. Few issues I can immediately think of to diagnose this issue: 1. File permissions 2. Host based firewall (on server itself), or actually port is not open for server you are trying to use 3. Time out setting due to slow connection, DNS not getting resolved, recipient IP is blocked 4. Certificate is expired (for some reason) and may be few other things if above cannot resolve problem. I will need access to your server (direct SSH preferred) or through reliable remote access to solve this problem or else may need sample code, certificate and passphrase. It cannot be solved in isolation remotely. I will also request to get continuous access to your server till problem is resolved because to resolve problems like this, one need to try various stuffs, in sequence. I will prefer to work overnight and close this issue at the earliest. Request further discussion if you want any clarifications or have concerns about this proposal
₹16 666 INR за 2 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор INDIA
India
0,0
0
На сайті з трав. 5, 2015

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.