Push notifications issues: key,failed/message not reach

1k views Asked by At

I'm still new to iOS dev. And I'm very, very new to whole APNS idea. I followed many tutorials, and didn't go so well. I'd like to ask some questions.

  1. Can I use same .certSigningRequest file for dev/dist/apns certificates? Does it matter if some of this certificates from this .certSigningRequest have been revoked?
  2. When I export my key in keychain to .p12 file, can I use this one for both dev/distribute version?
  3. If my server open port 2195, by giving .pem generated from above cer, my server should be able to send push message, right?
  4. How can I unsubscribe/unregister from my device and/or from server/apns service? I mean when I need to remove, and try to build&run the code again.
    4.1 How does
    [[UIApplication sharedApplication] unregisterForRemoteNotifications];
    really work? Does it tell apns not to send message/just turn it off? How can my server/provider know if device need to unsubscribe?

I find this tutorial really useful: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
And here some questions I have about what I encountered.
1. The sample app from the tutorial worked fine, using both my laptop & my server to send a message. But after a few days, it doesn't. (the response is still 'Connected to APNS Message successfully delivered', but the message never reach my device)
What could be the cause? My friend have revoked a dev cert? (I shared acc. w/ my friends) Or I reinstall the app? I also tried method unregisterForRemoteNotifications & register again, but nothing happens.
2. I also tried https://apphq.shephertz.com for a provider. This one requires .p12 key file in their format. (link) I have another project (this one is unity) register apns thru the app. It seems fine since I can see device token & user store in the web. But when I tried to send message, I got an error, like
iOS KeystoreException Device ID : <my-device-token> : Invalid keystore password! Verify settings for connecting to Apple... Does anyone know what this mean?

Sorry for my poor English.

0

There are 0 answers