Push notification not received on iPhone (no error showed)

1,436 views
Skip to first unread message

Vojtěch Vrbka

unread,
Apr 13, 2012, 10:32:57 AM4/13/12
to apns...@googlegroups.com
Hello,

I really don't know where is the problem. 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 the certificate at apple provisoning.
I get right token from iphone which i put into sample_push.php

If I execute "php sample_push.php" I will get no error but I not received any push notification on my iphone.
I have Macbook Pro 13-inch, Mid 2010 with Mac OS Lion.
I really don't know what to do. Please help me someone.

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:33 +0200 ApnsPHP[6478]: INFO: Disconnected.

Eddy

unread,
Apr 13, 2012, 7:50:09 PM4/13/12
to apns...@googlegroups.com
One question: The certificate at apple provisioning you got whether have push notification CheckBox selected? 

You know normal provision file DO NOT support push notification feature.

Thanks,
Eddie

2012/4/13 Vojtěch Vrbka <vojtec...@gmail.com>

Vojtěch Vrbka

unread,
Apr 13, 2012, 7:57:57 PM4/13/12
to apns...@googlegroups.com
Yes, look at image below. I follow all steps in the tutorial and I also tried few other tutorials, but all the same error. Looks like working, but iPhone don't get push notification.
Screen Shot 2012-04-14 at 12.53.18 AM.png

Eddy

unread,
Apr 13, 2012, 8:16:12 PM4/13/12
to apns...@googlegroups.com
Weird!

Please make below points are correct on your side.
1. The app register for all types of notifications, you can use below code:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert];
if you do not register the app, you never receive the notification.
2. To receive the device token you'll need to implement the following delegate methods:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
if still not working,  I will not have any hints except please do all the steps again, and please make all local certificate files, provision files removed. the local ENV is clean.

Good luck.
2012/4/14 Vojtěch Vrbka <vojtec...@gmail.com>
Screen Shot 2012-04-14 at 12.53.18 AM.png

never...@gmail.com

unread,
Nov 21, 2012, 5:22:05 AM11/21/12
to apns...@googlegroups.com
Same problem here. The only exception being I'm using production certificates since I'm doing ad-hoc binaries.

Any tip? I made sure my app is getting registered.

never...@gmail.com

unread,
Nov 21, 2012, 6:18:21 AM11/21/12
to apns...@googlegroups.com, never...@gmail.com
Just in case someone asks... I tried with two different hosts, and apps. Tried to create the certificates a couple of times, and even followed two different methods for their creation. I've checked the provision has APS enabled, the server is sending the message with the same device token I got in my app, and the certificate shows my app id.

As the original author, I get no errors at the server side, but never receive a notification on the device...

Could anyone tell me what else to check?

I'm gonna give EasyAPNS a go just in case...

wil...@mobilenet.co.nz

unread,
Nov 29, 2012, 6:25:40 PM11/29/12
to apns...@googlegroups.com, never...@gmail.com
Same problem here... no errors reported by APNS-PHP, checked all certificates and device tokens... no notifications delivered to the device.

Any ideas?

mazrou...@gmail.com

unread,
Dec 7, 2012, 11:02:21 AM12/7/12
to apns...@googlegroups.com, never...@gmail.com, wil...@mobilenet.co.nz
Hi,

I have the same problem here.
In fact, I have a script that runs indefinitely and reads a queue, and every time a notification is available in the queue, it sends it using apns-php.
It works fine for a moment, but after a while, there are no more notifications sent to the devices. I checked all the configuration, and it is OK.
In fact, I start receiving notifications if I restart the script.
Server side, there is no error: 
Fri, 07 Dec 2012 15:48:50 +0000 ApnsPHP[29775]: INFO: Sending message.
Fri, 07 Dec 2012 15:48:50 +0000 ApnsPHP[29775]: STATUS: Sending message (1/3): 241 bytes.

Just the notification is never received on the phone.

Do you know what the problem might be ?

dk.j...@gmail.com

unread,
Aug 28, 2015, 4:10:16 AM8/28/15
to apns-php
I have the same problem...

Not receiving any push notification in iPhone but apns reports 

no errors neither when establishing a connection nor when sending messages


Please have a look at the url below

http://stackoverflow.com/questions/32246163/apns-messages-are-delivered-but-not-received-on-ios-device


Thanks in advance

Reply all
Reply to author
Forward
0 new messages