Find Jobs
Hire Freelancers

Write some Software

₹1500-12500 INR

Zaprt
Objavljeno pred več kot 7 leti

₹1500-12500 INR

Plačilo ob dostavi
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 projekta: 11541832

Več o projektu

5 ponudb
Projekt na daljavo
Aktivno pred 8 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
5 freelancerjev je oddalo ponudbo s povprečno vrednostjo ₹19.853 INR za to delo
Avatar uporabnika
Hello Sir, We have Experienced Developers team in ionic. We are interested to work with you. Thanks, Vijay Thakor
₹16.111 INR v 2 dneh
5,0 (4 ocen)
3,1
3,1
Avatar uporabnika
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 v 2 dneh
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava INDIA
India
0,0
0
Član(ica) od maj 5, 2015

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.