HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
03/05/13 08:15 AM (12 years ago)

Push Notification Problems

I have downloaded and followed Niraj's PDF tutorial and have succesfully got the app running on my ipad mini. On first run I got the Push notification message and clicked yes, however when I look at the push notification registered devices its showing as 0. Can't seem to get past this and even removing the app from ipad and reinstalling doesnt give me the 'push notification' message Any suggestions / help would be much appreciated!
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
03/05/13 08:40 AM (12 years ago)
Try manualy changing that setting to 1 in the config file, and see if it prompts you for notification. Miguel
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/05/13 08:55 AM (12 years ago)
Hi Miguel, Thanks for the suggestion, Ive tried that as well as removing the app and re-installing but still has the same problem. When I check the notification settings on the ipad they are showing as on for the app but in my control panel there are no registered devices showing.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/05/13 09:14 AM (12 years ago)
Hello, Does it say anything in your debug console? For me, the first set of problems I had was that it looked like it was registering for push, but it wasn't, because my certificates weren't all in order. I ended up having to create new certs, after I enabled push, then installed them. That seemed to work. Perhaps the debug output can give us a clue. Mark
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
03/05/13 09:16 AM (12 years ago)
Yes, you must have the certificates procedure done correctly, and assigned them in xcode. But there are some hostings that do have the needed ports closed. I'm assuming you're on self hosted. Miguel
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/05/13 09:21 AM (12 years ago)
Hi Mark, Thanks for the reply. I'm having trouble getting the app to display the 'accept notifications screen' so I'm not able to see what is happening at this stage in the console. Is there a way I can get the ipad to forget my notification settings and set the app to display that screen?
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/05/13 09:22 AM (12 years ago)
Hi Miguel, I'm not using a self hosted server just now, was just using my account here - is that a problem?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/05/13 09:26 AM (12 years ago)
The only way I know how to reset the push settings is to delete the app and all the data. Other than that...not sure. Perhaps a phone reset would help.
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/06/13 03:50 AM (12 years ago)
Just a follow up on this for anyone having the same problem. Answer is in the webinar from March 5th. Once I was able to see what result the app was given (from error log) then I was able to get it to work. In this case, I just went back to the start and re-set my server, redone my certificates (using Nirajs excellent tutorial) and looked for things David pointed out in the webinar. For anyone still struggling with self hosting push notifications I found that one of my problems was caused by the port settings Using the following script (as per Shauns suggestion from the Webinar) <? $host = 'DOMAINNAMEHERE.COM'; $ports = array(2195,2196,80,21); foreach ($ports as $port) { $connection = @fsockopen($host, $port); if (is_resource($connection)) { echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n"; fclose($connection); } else { echo '<h2>' . $host . ':' . $port . ' is not responding.</h2>' . "\n"; } } ?> or even checking via the terminal telnet domainname.com 2195 Showed that the ports were closed. Waiting on the Server host to get back to me but hopeful I could be sorted now! John
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.