problem about apple-push-notifications-Record and share programming errors


  • Min
    ios phonegap apple-push-notifications
    I want to launch my app when clicking view button on push notification but my app gets terminated if the app is not in background.here is my error message from console.Aug 9 10:35:41 unknown listingApp[4527] : -[__NSCFDictionary absoluteString]: unrecognized selector sent to instance 0x1a8b50 Aug 9 10:35:41 unknown listingApp[4527] : *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFDictionary absoluteString]: unrecognized selector sent to instance 0x1a8b50’ *** Call stack at first throw: (0 CoreFoundation 0x36df764f __exceptionPreprocess + 1141 libobjc.A.dylib 0x34050c5d objc_exception_throw + 242 CoreFoundation 0x36dfb1bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 1023 CoreFoundation 0x36dfa649 ___forwarding___ + 5084 CoreFoundation 0x36d71180 _CF_forwarding_prep_0 + 485 listingApp 0x00002d09 -[AppDelegate application:didFinishLaunchingWithOptions:] + 2206 UIKit 0x35c12821 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 7727 UIKit

  • Dinesh
    php apple-push-notifications
    I checked this url and followed the steps to generated pem file from p12 file. Below is the code to generate the pem file….. if ($this->file->save($uploadDirectory . $filename . ‘.’ . $ext)) {$filenamewithpath = $uploadDirectory . $filename . ‘.’ . $ext;$handle = fopen($filenamewithpath, ‘r’);$p12buf = fread($handle, filesize($filenamewithpath));fclose($file); $password = @$p12pwd;$results = array();$worked = openssl_pkcs12_read($p12buf, $results, $password);//d($results); exit;if ($worked) {//echo ‘

    ', print_r($results, true), '

    ‘;$new_password = null;$result = null;$worked = openssl_pkey_export($results[‘pkey’], $result, $new_password);if($worked) {//echo ”

    It worked! Your new pkey is:\n", $resul
    

  • lalith458
    php apple-push-notifications
    While i am sending push notifications to multiple iphone devices using php webservices i am getting warning messages like :Warning: stream_socket_client() [function.stream-socket-client]: SS

  • BigT
    php iphone push-notification apple-push-notifications
    I get this error after trying to execute my php script to send a push notifcation to my iphone.I have tried everything and nothing works. I believe that this means my ck.pem is wrong but im not sure if its the key.pem or the cert.pem that is wrong. Please helpScript// This this a fake device id: $deviceToken = ‘9870h8v088bj29u080af894jj67klfgcv9mmm79k8e4l23456h908743n093e359’;// fake password: $passphrase = ‘123456’;// Put your alert message here: $message = ‘New Message’;//////////////////////////////////////////////

  • NullPoiиteя
    php iphone apple-push-notifications apns apns-php
    I followed the apple guide to set the certificate on my netbook. Then when I try to execute a push notify I obtain this error:Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in xxxx.php on line 92Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in xxxx.php on line

  • David
    php android ssl apple-push-notifications sl4a
    I recently downloaded and installed “PHP for Android.” I created a .php file that utilizes an SSL connection with port 2195. I followed a guide for writing a php server that sends push notifications to Apple

  • vabhatia
    ios push-notification apple-push-notifications entitlements code-signing-entitlements
    For the last 2 days I am trying to get push notifications on an iOS app but without any success. The application is using the correct provisioning profile,application identifier and entitlements. The app is even receiving the didRegisterForRemoteNotification callback which is received upon successful registration. I get the device token from this callback and use it to send this device a n

  • Krzysztof Luks
    c# osx mono apple-push-notifications
    I keep getting “The authentication or decryption has failed” errors while connecting to APNS. I have simple console application in C# that tries to connect to gateway.sandbox.push.apple.com an exception is thrown:Unhandled Exception: System.IO.IOException: The authentication or decryption has failed. —> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.at Mono.Security.Protocol.Tls

  • Vincent Cohen
    php titanium push-notification apple-push-notifications
    Using Titanium Mobile we created our first applications but our implementation of push notifications don’t seem to work. I am able to send the DeviceToken to a remote php script which mails me the token (for development purposes) I use this token to send a push notification.I have been following multiple tutorials http://iosmuncher.blogspot.nl/2012/06/implementing-apns-in-titanium-start-to.html and http://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ for the PHP script

  • Rahul Vyas

  • Greg Kopff
    java iphone apple-push-notifications bouncycastle jce
    I am using javaPNS_2.2.jar file to send push notification message to iPhone device.My Code is:PushNotificationPayload payload = PushNotificationPayload.complex();/* Customize the payload */ payload.addAlert(“Hello World!”); payload.addCustomDictionary(“mykey1”, “My Value 1”); payload.addCustomDictionary(“mykey2”, 2);/* Push your custom payload */ String keystore = “C:/1.0Eywa_Baba/PushNotificationKey.p12”; String p

  • smallgirl
    web-services ios6 apple-push-notifications passbook
    I am doing server for updating a pass. Now I want to send notification to APNS, but it doesn’t work. This is errors from php_error.log: [10-Apr-2013 08:59:24 Europe/Berlin] PHP Warning: stream_socket_client(): Unable to set private key file `/Applications/MAMP/htdocs/passesWe

  • Adil Malik
    coldfusion push-notification apple-push-notifications coldfusion-10
    I want to send Push notification using Coldfusion. I couldn’t find much help on google. I could find only one article that discusses this topic. But unfortunately I am getting exceptions while following that method. As that method uses a JAR file, I am not able to debug the exception. Even I cannot see the exceptions.I just want to know is there a simple way to send Push Notifications? Like there is one for Android. In Android you just have to send an http request and you’re done. But I can see things are so complicated in case of Apple.But I am sure that someone would have definitely achieved this. Can anyone please help me on this?Finally from suggestions, I implemented onError in my Application.cfc and got the following error:Could not initialize class com.r

  • koalabruder
    php ssl apple-push-notifications apns
    I’m trying to connect to Apples Push Notification Service (apns) with php. If I use the command openssl s_client -connect gateway.push.apple.com:2195 -cert AppCert.pem -key AppKeyNoPass.pem -CAfile ca.pemon the console I get a long message with “Verify return code: 0 (ok)” in the last line. If I use the following PHP code I get

  • Götze

  • Till
    ios push-notification apple-push-notifications apns
    APNS returns the following status codes in error response packets when using the enhanced notification format.0 – No errors encountered 1 – Processing error 2 – Missing device token 3 – Missing topic 4 – Missing payload 5 – Inva

  • Widor
    ios apple-push-notifications
    I’m new to iPhone app development. I have the app with push notification, after it works for one and half days after the installation into my 4S (ios 5.0.1) for testing, it suddenly stops receiving alert message. After some research, I have the APS/PC logging profiles loaded in my phone, now I see the following log:: Connected to courier 1-courier.sandbox.push.ap

  • TheSquad
    ssl erlang apple-push-notifications gen-server
    I’m currently testing a bit my push notification module. When the Device Token is invalid, it disconnects…According to Apple push notification developer documentation I should get an error-response packet just before the apple push server disconnect…The thing is I get disconnected, but I do not get anything on the Socket just before that, and I need to know if the push failed because of a malformed push (so I can fix the bug), or an invalid device token (so I can remove it from the database).Here’s my code : -module(pushiphone). -behaviour(gen_server).-export([start/1, init/1, handle_call/3, handle_cast/2, code_change/3, handle_info/2, terminate/2]).-import(ssl, [connect/4]). -record(push, {socket, state, cert, key})

  • John
    ios apple-push-notifications
    When i run below script on terminal it gives Error : Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in /Applications/MAMP/htdocs/SimplePush/simplepush.php on line 21Warning: stream_socket_client(): Failed to enable crypto in /Applications/MAMP/htdocs/SimplePush/simplepush.php on line 21Warning: stream_socket_client():

  • Vojtech Vrbka
    iphone ios push-notification apple-push-notifications apns-php
    I really don’t know where is the problem. I am using library ApnsPHP to sending Push notifications. I also tried other scripts, but that also not working.I generate push certificates with this tutorial (http://code.google.com/p/apns-php/wiki/CertificateCreation) and also put them to apple developer website. I get right token from iphone which i put into sample_push.phpI have Macbook Pro 13-inch, Mid 2010 with Mac OS Lion.vojta:~/dev/www/application$ php sample_push.php Fri, 13 Apr 2012 16:23:24 +0200 ApnsPHP[6478]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195… Fri, 13 Apr 2012 16:23:32 +0200 ApnsPHP[6478]: INFO: Connected to ssl://gateway.sandbox.push.apple.com:2195. Fri, 13 Apr 2012 16:23:32 +0200 ApnsPHP[6478]: INFO: Sending messages queue, run #1: 1 message(s) left in queue. Fri, 13 Apr 2012 16:23:32 +0200 ApnsPHP[6478]: STATUS: Sending message ID 1 [custom identifier: Message-Badge-3] (1/3): 109 bytes. Fri, 13 Apr 2012 16:23

  • darshgohel
    java apple-push-notifications
    I am developing a Push Notification service in Java for apple, and for that i have used JavaPNS 2.2. I have used tutorials available at this site to create my certificates in Apple and run the demo (in PHP), successfully. (I have also converted the certificates in .p12, .pem files).However when i try to run the simple push notification in java in my test class (As specified in JavaPNS tutorial),public class PushTest {public static void main(String[] args) {try {List notifications = Push.alert(“Hello World!”, “.p12”, “”, true, “”);System.out.println(“List of Device: “+notifications);List inactiveDevices =

  • BigT

  • BigT
    asp.net apple-push-notifications moonapns
    I have tried using the Moon APNS to get Push notifications to work for Apple iPhones. I am trying to do it live on the production certificate. I have added the certificates and p12 file on my windows system. Below is the code for the Program.cs (I renamed it on my server) with some differences.Here is the originalHere is mineusing System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Security; using System.Net.Sockets; using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; using NLog;namespace ServerStuff.Modules.APP.Entities.Notification.Apple { public class ApplePushNotification { private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private TcpClient _apnsClient; private SslStream _apnsStream; private X509Certificate _certificate; private X509CertificateCollection _certificates;public string P12File { get; set; } public string P12FilePassword { get; set; }// Default configurations for APNS private const string ProductionHost = “gateway.push.apple.com”; private const string SandboxHost = “gateway.sandbox.push.apple.com”; private const int NotificationPort = 2195;// Default configurations for Feedback Service private const string ProductionFeedbackHost = “feedback.push.apple.com”; private const string SandboxFeedbackHost = “feedback.sandbox.push.apple.com”; private const int FeedbackPort = 2196;private bool _conected = false;private readonly string _host; private readonly string _feedbackHost;private List _notifications = new List(); private List _rejected = new List();private Dictionary _errorList = new Dictionary();public ApplePushNotification(bool useSandbox, string p12File, string p12FilePassword) {if (useSandbox){_host = SandboxHost;_feedbackHost = SandboxFeedbackHost;}else{_host = ProductionHost;_feedbackHost = ProductionFeedbackHost;}//Load Certificates in to collection._certificate = string.IsNullOrEmpty(p12FilePassword)? new X509Certificate2(File.ReadAllBytes(p12File)): new X509Certificate2(File.ReadAllBytes(p12File), p12FilePassword);_certificates = new X509CertificateCollection {_certificate};// Loading Apple error response list._errorList.Add(0, “No errors encountered”);_errorList.Add(1, “Processing error”);_errorList.Add(2, “Missing device token”);_errorList.Add(3, “Missing topic”);_errorList.Add(4, “Missing payload”);_errorList.Add(5, “Invalid token size”);_errorList.Add(6, “Invalid topic size”);_errorList.Add(7, “Invalid payload size”);_errorList.Add(8, “Invalid token”);_errorList.Add(255, “None (unknown)”);List test = GetFeedBack(); }public List SendToApple(List queue) {Logger.Info(“Payload queue received.”);_notifications = queue;if (queue.Count < 8999){SendQueueToapple(_notifications);}else{const int pageSize = 8999;int numberOfPages = (queue.Count / pageSize) + (queue.Count % pageSize == 0 ? 0 : 1);int currentPage = 0;while(currentPage < numberOfPages){_notifications = (queue.Skip(currentPage * pageSize).Take(pageSize)).ToList();SendQue

  • AsTheWormTurns
    php iphone sockets ssl apple-push-notifications
    Disclaimer: on SO I found many similar questions and some answers but none solved my issue.I have this easy PHP code:

Originally posted 2013-10-17 04:39:24.