Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 105

JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
06/24/13 12:02 AM (12 years ago)

Push - some general assistance on a seemingly solvable problem

Hi all, Having problems with push (not entirely surprising!) and I'm hoping I can prevail on the group for some advice as to where I'm going wrong… I've followed the instructions in the PDF guide to the letter and am still failing to get PN on either live or dev products in both an app that's in store and also still in development. To confirm, I have a .pem file that I've generated using the terminal command. I did not give it a password during its creation in terminal. I have entered a password on the BT server side where it requests a ".PEM Certificate Passphrase" I receive the following message when trying to send the PN in either Dev or Prod mode over two different apps (on live, one in dev): "Error sending Could not process Feedback from APNS (1) This is normally caused by an invalid APNS Certificate (tried your Development Certificate aka:"Sandbox" certificate) Oops, a PHP error was trapped. File: /home4/btmods/public_html/hosted/tradebox/bt_v15/bt_app/bt_pushNotifications_AJAX.php Line: 71 Message: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://feedback.sandbox.push.apple.com:2196 (php_network_getaddresses: getaddrinfo failed: Name or service not known)" I've checked with my server and am assured all ports are open and functional. I'm therefore thinking I'm generating my certificates incorrectly. However, there are surely some other options that I'd like to rule out first… - Could the name of the .p12 or the .pem be causing a problem? I'm saving my .p12 as "Certificates.p12" and my .pem as "appnamedev.pem". - Could there be a conflict between Scringo and BT Push? - Also, why does Scringo only require a .p12 to (apparently) operate push whereas BT needs a .pem? - Clutching at straws here but could the case of the file extension affect anything? The BT server requests a ".PEM" cert whereas my file extensions are all lower case (I've come unstuck here before so think it worth asking!) As PN doesn't work o either my self hosted server or through Scringo, all pointers are saying it's a cert / ID / provisioning profile error. If anyone has any pointers, I'd be most grateful.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/24/13 06:24 AM (12 years ago)
Hi @JimmySaver Getting push to work is tricky. From what you have described, I would tend to agree that it is might be certificate related. In my experience, the naming of them isn't too critical though. A couple of things to consider An alternative to using Terminal to make the .pem file is to use an online utility, at http://p12pem.com You be repeat the same steps to create a Production Certificate and production .pem as you do for a development certificate and dev .pem file. If you make prod and dev both at the same time you know if you got the dev one right, you probably got the production one right. The iOS Simulator does not support push notifications. This means you’ll need to create a Provisioning Profile, using the App ID you created, then compile your app with the Provisioning Profile when installing on your testing device. Look carefully at the provisioning profile used to code sign in xcode. It has to match to the app values used to the certificate exactly. Its worth doing a simple app on your buzztouch hosted console to prove that it isn't related to the set-up of you self-hosted (if you have one). Definitely try to prove it works to yourself in dev mode first. LAstly, you could try using a different push supplier to convince yourself about the certs. A lot of people here have had success with Parse.com. I hope this helps. Alan PS - I haven't used Scringo.
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
06/24/13 07:13 AM (12 years ago)
Thanks Alan - It's a great idea to do a test on the BT hosted site. I'll get on it.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/24/13 08:21 AM (12 years ago)
You're welcome. Btw, I learned to do parse push before by push came along. I know the idea of using it as a test sounds a bit extreme, but I found it was the only way to convince myself I had learned to do certs correctly when learning BT push.
 

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.