0

I am trying to use FIRMessaging to send message from device to device. Using the instruction:

[[FIRMessaging message]sendMessage:(nonnull NSDictionary *)message
                            to:(nonnull NSString *)receiver
                 withMessageID:(nonnull NSString *)messageID
                    timeToLive:(int64_t)tel;

where message is a Dictionary with values: to, subject, body. In to I have put de Firebase the FCM serverID: AIz...5itA@@gcm.googleapis.com, messageID is a construct of user-UID and timespan and finally timeToLive is 2400.

When running my code and sending the message, FIRMessaging Delegate comes back with sendDataMessageSuccess. BUT, the message was never received by the corresponding iOS Device.

Does anyone has got this to work and if so how?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • `sendMessage` sends a so-called upstream message from the device to your app server. There is currently no method to send messages from device to device. See http://stackoverflow.com/questions/37634046/is-it-possible-to-send-pushnotifications-using-firebase-cloud-messaging-fcm-t/37634914#37634914 – Frank van Puffelen Jul 07 '16 at 15:11
  • Great! Very clear answer. As I don't want to invite the wheel again, is there a service out there that has a SDK so send PushNotifications from device to device, between iOS, Android and Web? – Dietmar Schwarz Webers Jul 07 '16 at 15:27

0 Answers0