Closed kiasaki closed 4 years ago
What is your user_id?
User ID that owns this app (App ID 1121861) is 928699539 (@estebanoc). My personal User ID is 532457147 (@kiasaki).
@kiasaki Could you try again (it is expected to fail) and tell exact time when the push notification was expected to be received?
Sure thing, I should have received a few just now. At around 4:55 EST on January 10, 2020.
@levlam Where you able to find some logs about this? Can you point me to some code that actually uses APNS to receive notifications?
I've tried using Firebase Messaging on iOS without success too.
@kiasaki We haven't found anything suspicious regarding your app. The uploaded APNS certificate looks correct.
TDLib just registers device server-side when the method registerDevice
is called:
https://github.com/tdlib/td/blob/0dcbe4973afe4770785b7286994745e5704fbd34/td/telegram/DeviceTokenManager.cpp#L380
After that push notifications are supposed to be sent by the server to APNS, then forwarded to the device, catched by the application and passed to the TDLib through processPushNotification
method if possible.
@kiasaki Server fails to connect to APNS push notification server ssl://gateway.push.apple.com:2195 with the error "Failed to use private key". So, it seems that something is wrong with the key.
@levlam Oh! Thanks for the information. That's great news! I'll look into those then. Thanks for the help debugging this.
Hello there TDLib devs!
I have a mobile iOS app that is using TDLib and I want to get background push notifications working, I initially tried using FCM/GCM/Firebase because I used that in the Android version of my app successfully but I haven't been able to get "background"/"remote" notifications with it.
So I setup a separate telegram account & app id to use Apple/APNS, uploaded certificates and am calling
registerDevice
but no notifications seem to come through on the device (I am aware that the simulator doesn't support push/background/remote notifications and I have to use a real device to test).Any clues on what I might have missed? I looked at the ObjC & Swift versions of the official clients and they don't seem to be using
registerDevice
different than I am.Here are the logs with the verbosity level set to 4 from startup up to the successful call to
registerDevice
: