PORTUGUÊS - DETECTADO

PORTUGUÊS - DETECTADO

INGLÊS

Hello everyone, everything good? I'm developing an app for my company, this is almost all set. I'm working on the last part, the notifications. I adopted the firebase, android worked 100% in 15 minutes everything was working already. But I'm getting caught in IOS, I've read a lot of articles, I've done a lot of tutorials but I was not successful, the app generates the token, but when I test through the send firebase, it gives the error: Invalid registry token see the token format . Someone has already experienced this problem. I use tokyo with the following code:





{$IFDEF ANDROID}
PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.GCM);
PushService.AppProps[TPushService.TAppPropNames.GCMAppID] := CODIGO_APP_GCM;
{$ENDIF}
{$IFDEF IOS}
PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.APS);
{$ENDIF}


ServiceConnection := TPushServiceConnection.Create(PushService);
// // ServiceConnection.OnChange := DoServiceConnectionChange;
ServiceConnection.OnReceiveNotification := DoReceiveNotificationEvent;
ServiceConnection.Active := true;

ADeviceID := PushService.DeviceIDValue[TPushService.TDeviceIDNames.DeviceId];
ADeviceToken := PushService.DeviceTokenValue[TPushService.TDeviceTokenNames.DeviceToken];
ClientREST := TServerMethods1Client.Create(ClientModule1.DSRestConnection1);
RetRegistraToken := ClientREST.RegistraToken(edtuser.Text, varRetorno.NomeUsuario, ADeviceID, ADeviceToken);

Comments

  1. David Nottage Good morning, how are you? Thank you for the tips. I have analyzed https://github.com/DelphiWorlds/PushClient/blob/master/DW.PushClient.pas until I deleted my code .... kkk .... very good. I downloaded the github.com - DelphiWorlds/PushClient demo to test and learn, on Android it was 100% worked right. In ios it generated the perfect token, I go in the firebase sending the message, it gives as sent right, but in the ipad does not receive the notification. I believe that I should be filling out the const const cFCMBundleID, which exactly should I fill here. Thank you in advance for your patience and help.

    ReplyDelete
  2. Have you add Push Notifications to your App ID in your Apple Developer account?

    ReplyDelete
  3. Yes, I have deleted the certificates, I have re-created, I have reformed all the steps, I do not know what is missing, the firebase says the message was sent, but it did not arrive, as it has no log, it is difficult. If anyone has any more ideas, it is very welcome.

    ReplyDelete

Post a Comment