Private Sub SendMessageToIos(Topic As String, data As Map)
Log(Topic)
Dim Job As HttpJob
Job.Initialize("fcmIOS", Me)
Dim m As Map = CreateMap("to": $"/topics/${Topic}"$)
If Topic.StartsWith("ios_") Then
Dim iosalert As Map = CreateMap("title": data.Get("Title"), "body": data.Get("body"), "sound": "default")
m.Put("notification", iosalert)
m.Put("priority", 10)
m.Put("content_available", True)
End If
m.Put("data", data)
Dim jg As JSONGenerator
jg.Initialize(m)
Job.PostString("https://fcm.googleapis.com/fcm/send", jg.ToString)
Job.GetRequest.SetContentType("application/json;charset=UTF-8")
Job.GetRequest.SetHeader("Authorization", "key=" & WebApiKey)
End Sub