Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 448
001 Avatar asked Jun 29 '11 01:06

001


People also ask

Can you test push notification in iOS simulator?

The first step to simulate a push notification in a simulator is creating and storing an . apn file. The file contains the JSON notification payload that the app would otherwise receive from the server.

Does iOS support push notification?

An iOS push notification is a message that pops up on an Apple device such as an iPhone. Before receiving push notifications from an app, iOS device users must explicitly give permission. Once a user opts-in, mobile app publishers can send push notifications to the users' mobile devices.

Why push notification is not working for iOS?

Go to iOS' settings → "Your app name" → Notifications to ensure notifications are enabled for your app. You will need to restart your app after enabling push notifications. If you find a recent install with a push token in the debug tool, make sure your app is not opened in the foreground during your tests.


2 Answers

  1. 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.

  2. 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?

like image 144
tc. Avatar answered Sep 26 '22 22:09

tc.


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

like image 24
Rick Avatar answered Sep 26 '22 22:09

Rick