We would like to setup our own wire server for security reasons. And I understand that we need a apple developer account to generate a push certificate for APNS. But I didn't find any APNS related codes such as 'registerForRemoteNotifications' or 'didRegisterForRemoteNotificationsWithDeviceToken'. Does that mean APNS have been completely removed from source code? How can we pass the device token to wire server? Thank you for any help
Hi @zj299792458 馃憢 . The Wire app uses VOIP push notifications to receive hints from the backend that new events need to be fetched, decrypted, decoded and finally processed. For this we use PKPushRegistry and the corresponding delegate class.
This code resides in the SyncEngine repository in SessionManager+Push.swift. The push token returned upon successful registration is stored in the user client object and subsequently saved to CoreData. CoreData will then notice the change, alert the interested parties, which will in turn schedule a backend request up store the push token on the server.
I hope this points you in the right direction!
Hi @zj299792458 馃憢 . The Wire app uses VOIP push notifications to receive hints from the backend that new events need to be fetched, decrypted, decoded and finally processed. For this we use PKPushRegistry and the corresponding delegate class.
This code resides in the SyncEngine repository in SessionManager+Push.swift. The push token returned upon successful registration is stored in the user client object and subsequently saved to CoreData. CoreData will then notice the change, alert the interested parties, which will in turn schedule a backend request up store the push token on the server.
I hope this points you in the right direction!
Thank you so much! 馃槵
@johnxnguyen Hi again 馃槄
Now I have my own APNS VoIP push certificate and key in p12/pem format.
Do you happen to know how to deploy this to wire server? I checked the code, it should be somewhere in gundeck right?
Have a nice day!馃槵
Well, the server-end is using Amazon SNS for APNS... hmmm, I'll look it up. Thank you anyway 馃槵
Hi @zj299792458 , for server related questions I would recommend opening issues on the server repository. Good luck!