Hi there,
Im using FMX Delphi 12.2 with FireBase iOS SDK v. 6.28. I successfully retrieve the device token, but when i send a push notification via Insomnia or Firebase my I'Phone doesn't receive any push notification. Sometimes i get the following response from the request:
{
"error": {
"code": 401,
"message": "Auth error from APNS or Web Push Service",
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "THIRD_PARTY_AUTH_ERROR"
},
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.ApnsError",
"statusCode": 403,
"reason": "InvalidProviderToken"
}
]
}
}
I followed the steps mentioned here: https://synaptica.info/en/2022/03/24/delphi-11-firebase-cloud-messaging-fcm-ios-app-push-notification-1/
My project includes the GoogleService-Info.plist in its resources, the UIBackgroundModes key has the remote-notification value assigned and my firebase project is configured with the APNS key.
Im obtaining the device token using the TPushService and TPushServiceConnection classes:
PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.FCM);
What am i missing? Could this be related to apple ids, certificates or provisioning profiles config?
I'd greatly appreciate any help