FCMServiceClient
public protocol FCMServiceClient
                The FCM service client, which can be used to send push notifications to other users via MongoDB Stitch.
- 
                  
                  
Sends an FCM message to the given target with the given request payload.
Declaration
Swift
func sendMessage(to target: String, withRequest request: FCMSendMessageRequest, _ completionHandler: @escaping (StitchResult<FCMSendMessageResult>) -> Void)Parameters
tothe target to send a message to.
withRequestthe details of the message.
completionHandlerThe completion handler to call when the message is sent or the operation fails. This handler is executed on a non-main global
DispatchQueue. If the operation is successful, the result will contain the result of the send message request as anFCMSendMessageRequest. - 
                  
                  
Sends an FCM message to the given set of Stitch users with the given request payload.
Declaration
Swift
func sendMessage(toUserIDs userIDs: [String], withRequest request: FCMSendMessageRequest, _ completionHandler: @escaping (StitchResult<FCMSendMessageResult>) -> Void)Parameters
toUserIDsthe Stitch users to send a message to.
withRequestthe details of the message.
completionHandlerThe completion handler to call when the message is sent or the operation fails. This handler is executed on a non-main global
DispatchQueue. If the operation is successful, the result will contain the result of the send message request as anFCMSendMessageRequest. - 
                  
                  
Sends an FCM message to the given set of registration tokens with the given request payload.
Declaration
Swift
func sendMessage(toRegistrationTokens registrationTokens: [String], withRequest request: FCMSendMessageRequest, _ completionHandler: @escaping (StitchResult<FCMSendMessageResult>) -> Void)Parameters
withRequestthe details of the message.
completionHandlerThe completion handler to call when the message is sent or the operation fails. This handler is executed on a non-main global
DispatchQueue. If the operation is successful, the result will contain the result of the send message request as anFCMSendMessageRequest. 
      FCMServiceClient Protocol Reference