I’m developing a mobile application with a mac, but it connects to a test server I’m running on linux and I’d like to enable APN on this server with a developer certificate, the question is, is it possible to install this certificate on my test server or I’ll have to setup the test server on my linux machine?
To make this a little bit clearer:
My development machine: A Mac.
The test server: A linux machine running liferay 6.0.6
I want to install the development certificate on the test server so I can test push notifications.
Thanks a lot!
I’d like to answer my own question because it might help someone, first of all, I had a terrible confusion between the certificates I needed to generate and how to get the device token among other things.
These are the steps I went through to make this work:
Here is a sample snippet that shows where the certificate fits in:
The second argument of the method is the password for the p12 file that keychain access makes you to set.
Finally to glue things, I used the
[UIApplication sharedApplication]instance to register to receive push notifications and by implementing a method on the AppDelegate I get the token I needed which was in NSData format, so you need to converted into a hex string (there is sample code for that in many sites and questions on this site).And that’s it, that’s the process.
Hope this helps!!