Find Jobs
Hire Freelancers

Write some Software

₹1500-12500 INR

Cerrado
Publicado hace más de 7 años

₹1500-12500 INR

Pagado a la entrega
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 del proyecto: 11541832

Información sobre el proyecto

5 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
5 freelancers están ofertando un promedio de ₹19.853 INR por este trabajo
Avatar del usuario
Hello Sir, We have Experienced Developers team in ionic. We are interested to work with you. Thanks, Vijay Thakor
₹16.111 INR en 2 días
5,0 (4 comentarios)
3,1
3,1
Avatar del usuario
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 en 2 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de INDIA
India
0,0
0
Miembro desde may 5, 2015

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.