APNS never triggers registrationSucceeded callback.


#1

Hi, I’m struggling with push notifications on iOS (iPhone). I’ve followed the documentation (thoroughly) multiple times, yet to no avail.

None of the callbacks listed in the documentation (registrationSucceeded, error nor receivedMessage) gets triggered, even after I’ve granted access to send push notifications from my application.

A minimal example is attached. I have also included screenshots of various Apple Developer settings.

Download minimal example (ZIP)





#2

Hi Michael, sorry to hear about the issue. Nothing looks wrong in your project. I will run through the process here to see if anything has changed that I have missed. I should have an update (or at least more questions) early tomorrow.

Thanks for reporting this!


#3

And I’m back, sadly without good data. I tested your app on a 5s running v9.0.1 and a 6+ running 9.3.2 and in both cases I got a registration token immediately.

Could you post which model of iPhone & OS version you are using?

Also (just in case) your XCode version, macOS version & the command you used to build would be useful too.

Thanks


#4

That is strange. These are my specs:

  • macOs Sierra 10.12.5
  • iPhone 5, iPhone 6
  • iOS: 10.0.2
  • Fuse version 1.0.3 (build 13739)
  • Xcode version 8.3.3

#5

Thanks, I’ll grab an iOS 10 device and see if that is related.

Also this is unrelated but you may want to consider using our community push notification projects:

I doubt this will have any effect on this issue but the advantage of using them is that I can get fixes out to you without having to wait for the usual fuse release cycle. They downisde of course is having to clone the repo.

The reason for the split is two-fold.

  • Firebase is capable of providing push notifcations for both Android & iOS (but not when app is closed on iOS)
  • GCM is deprecated and google are advising everyone to move to Firebase for push.

Those two projects are designed so they can be used together. See here for an example

Hopefully we’ll have more data in an hour or two.
Cheers


#6

Thanks Chris! If you are up for it, I could walk you through the different certificates/provisioning profiles I have used. I actually suspect that the problem lies somewhere therein.


#7

Hello! I’m having the same problem. Did you Michael solve this?


#8

Switching to distribution version fixed this, but is it normal that registrationSucceeded etc don’t work with development versions on iOS?


#9

Did you turn on your push notifications capabilities for your xcode project?


#10

Yes I did. Everything was the same except changing from development to distribution.


#11

Strange, I got the same setup, tested with iPhone 5, 6 & SE, only other thing I could think of, is the DevelopmentTeam config variable. Were you able to send with NWPusher? I first got it sending with that, then got it working in the project:


#12

One thing could be a development team mix-up, but I don’t have an opportunity to debug it at this moment. I’m pushing APNS and FCM through PHP scripts and it works fine in distribution. I’ll doublecheck the development team next time creating a version. Thanks!