Certificate creation for Apple push notifications - iphone

I need to integrate apple push notifications. I am not clear about the certificate needed for the server. As I know this is a generated certificate form server end and does it needed to be signed by a valid certificate authority? If so how does APNS going to validate this?
For the apple sandbox cant we proceed with a test certificate?
Is there any chance to test this APNS process in the simulator?
Thank you.

You need to generate the certificate on the iOS Provisioning Portal, according to the instructions on the docs (also available on the portal). You don't need to worry about the details of the certificate; the Provisioning Portal takes care of all the details for you. You need to do this for each of you App IDs and you need to be the Agent of your organization to do this.

Related

iPhone app submitted with developer certificate

I've just accidentially submitted an update for my app via organizer -> distribute, not noticing that my build settings still had the developer certificate set instead of the distribution certificate.
will the update still work on the users devices, or will it fail to install? I did not find any option to reset the submitted app, so I will probably have to wait until its published. Or will it even be rejected for not beeing signed with a distribution certificate?
App Store will likely reject if you have the wrong certificate. Send Connect an email and explain, they're usually pretty helpful.

iOS Push notification distribution certificate

I have a problem with distribution certificate of push notification. First I used developer certificate and push notifications works fine. Now my app is in app store and I use distribution certificate. I generated it in developer portal, create provisioning profile and subscribe app with this profile. Then I created certificate for server side and used it. If I send notification apple return connection OK but notification is never deliver. Where is a problem ? Thanks a lot ...
Try to generate a new certificate, it happen sometimes.
Thus, what kind of script do you use to send push notification ? if you use Easy APNS, make sure the "Production" certificate is selected for each device in you database.

Push Notification APNS Certificate USAGE:

I need to create an iPhone app, that uses a push notification feature. I have created the "aps_developer.identity.cer" certificate and downloaded it from Apple Developer account. Is this certificate has any importance at the iPhone App side OR it is solely used at SERVER side to send Device TOKEN? Please help. Thank you.
Both. You need separate certificates for development and release that support push notifications as well as a distribution certificate (Ad hoc or AppStore) that is linked to the AppID in the other certificates these are used to sign the app as well as being used for the server.
E.g. If you are debugging, the server needs to use the development certificate, if you are testing or have released the application, the server needs to use the distribution certificate. The apple push servers change depending on which method you are using. I would read the apple documentation on push notifications which also covers the provisioning side of things.
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
As far as creating the server certificate, I used this guide and found it very helpful:
http://code.google.com/p/apns-php/wiki/CertificateCreation
Good Luck!

Can I use the same .pem file for both Development and Distribution Profile

While making my application to be listened for Push Notification, I have read the guideline given by Apple. It is clearly mentioned that Certificate for Sandbox and Production should be separately created.
My question is, is that Production certificate goes with "Distribution Profile" also?
If yes, then does this means that even though I am creating this profile for testing purpose I have to attach my Production Certificate with that Profile?
Thank you in advance.
The debug/developer pem has to be used with a developer mobileprovision and Apple's sandbox APNS URL
The distribution pem can be used with an Adhoc and App Store mobileprovision and Apple's production APNS URL
Not sure if this answers your question. If you need any more details, please specify in your question.

How to test iOS push notification?

I hired an objective-c programmer to develop my iphone app, he wrote the code, and now I want to test the push notification service, but he wouldn't send me the p12 file, he said he cant send me the p12 key, because it contains his private key.
1) So can I create the p12 file myself, if so how can I do this? doesn't it need to be attached to the app? I need the app's id?
2) Can I just add him as a developer under my apple' developer account so he can set up everything?
The key used with APNS does not need to be the same key used for signing apps. It should not be the key used for signing apps, since it will end up installed on a virtual server on third-party hardware in a fourth-party data center. You might even want to use different development and production keys, if more people will have access to the development server (e.g. developers might run it on their own computers as necessary for debugging).
You can create the keypair, send him the CSR, get him to create the cert and send that to you, and use the cert on your server.
You'll need to set the app up under your own account at some point anyway (assuming you're not going to pay him to support it indefinitely) so you might as well do it now. Depending on how much you trust him, you can add him as a developer or just do it all yourself.
I'm pretty sure you can also give accounts restricted permissions - just enough to upload a CSR, create an "iPhone Development" cert, and download provisioning profiles. You can do the rest (add UDIDs, set up app IDs, and configure provisioning profiles), right?
You can create your own .p12 file and your app is not dependent on push notification certificate.
.P12 is used to authenticate and communicate between correct device and APNS server.
Check this tutorial
Once done you can test using by your own server if you have access or use the below tool to test
Pushtry.com