8

I've installed according to the manual.

But only when I send the message to all iOS platform, only then I am getting the push notification. But when I am sending my massage to specific version or specific device for testing purposes, the massage is not received on the device. enter image description here enter image description here What could be the problem?

The strange thing, is when I ran the application with a new version, I do not see this version in the versions dropdown for couple of days. Even though that the code does reach

FIRApp.configure()

enter image description here

  • ran the code with 2.5.5 version
brandonscript
  • 68,675
  • 32
  • 163
  • 220
Luda
  • 7,282
  • 12
  • 79
  • 139
  • In the case of sending to a specific device could you add how you are retrieving the token, in some cases you can have more than one token which invalidates previous ones. – Arthur Thompson Aug 05 '16 at 20:01

2 Answers2

0

Are you sure you get the right token ?

The token can be obtained by FIRInstanceID.instanceID().token()!

But The registration token may change when,

The app deletes Instance ID.

The app is restored on a new device.

The user uninstalls/reinstall the app.

The user clears app data.

Double check your token and make sure you enter right token.

renjithr
  • 313
  • 4
  • 12
0

I was missing a pod :-/

Instead of

pod 'Firebase/Core'
pod 'Firebase/Messaging'

I had:

pod 'Firebase/Core'

Strangely, before the change, the project compiled and instanceID was generating, even though the pushes were not received to the device. Adding the missing pod fixed the problem.

Luda
  • 7,282
  • 12
  • 79
  • 139