11

I've implemented apns in my applicaton and it was working till yesterday without any problem. Today suddenly it stopped working and the following method is not being called:

-(void) application:(UIApplication) applicaton didRegisterForRemoteNotificationWithDeviceToken:(nonnull NSData *) deviceToken;

I didn't find any valid reason. My iOS version is 9.3.2;

In device log I see the following error message:

Failed to validate certificate chain for courier.sandbox.push.apple.com

I factory reset the device but it didn't work.

Interestingly, the apns works on my other device with same iOS version.

More interestingly, on the same device my another Test Push Application (same code copy and pasted) works fine.

Does anybody have any idea to solve this issue?

Thanks in advance.

farhad rubel
  • 2,334
  • 2
  • 22
  • 29

2 Answers2

4

Similar issue happened to me today as well on 3 test phones, all running iOS 9.3.2. One is an iPhone5 and the other is an iPhone 6.

The following insights may help avoid the problem, until fixed:

  1. I saw that the problem only occur when signing the app with a development certificate. On production environment everything seemed to work as expected (both for regular APNS and for VoIP APNS).

  2. The problem is reproducible only on one of our apps. A different app, even if signed as development, worked as expected (i.e. didRegisterForRemoteNotificationWithDeviceToken was called by the system).

  3. The problem was not reproducible when testing the problematic app on an iOS 8.4.1 phone, both for regular APNS and for VoIP APNS.

Update for July 20, 2016: It seems that this was a temporary issue in APNS Sandbox environment, everything went back to normal today.

AmitW
  • 798
  • 8
  • 11
  • 2
    Any hints on what might be the difference between the app not working and the working one? – UnsafePointer Jul 19 '16 at 09:54
  • The only major difference I can spot is that the non working app is currently on iTunes connect while the working one is not. – AmitW Jul 19 '16 at 11:45
1

It seems that, it was a problem of apple push notification sandbox server. Today it's working.

farhad rubel
  • 2,334
  • 2
  • 22
  • 29