Open dkrasner opened 2 years ago
Hi @dkrasner thanks for opening this issue. You are correct, I have had a look and the documentation around this area could do with some improvements. Unfortunately if you are creating a fork of Element you will need to host your own push notification server, and configure this with your own certificates (sygnal docs). Also worth noting that the simulator only supports simulating push notifications by use of a .apns
JSON file, so any testing you do would need to be on a real device (but a debug build connected to Xcode is fine).
Sorry I can't provide much more help in this regard.
@pixlwave thanks for the confirmation.
Is the need to self-host a notification a question of Apple's security requirements, or a choice by element?
Also is there anything else other than pointing to your proper notification/sygnal server, adding the certificates as in the doc I should be aware of?
Finally, would it be helpful if I added a section about this in the element-ios documentation?
Is the need to self-host a notification a question of Apple's security requirements, or a choice by element?
I haven't specifically asked anyone about this, but I would imagine this was a decision made by Matrix / Element not wanting to host, update and be responsible for the certificates from every matrix client that supports push.
Also is there anything else other than pointing to your proper notification/sygnal server, adding the certificates as in the doc I should be aware of?
This should be all that you need to do yes, although I've been told it is not super simple. There is an old guide on how to set up your certificates, but it's worth pointing out that we no longer use the Info.plist for this and instead use .xcconfig files: https://www.keyvanfatehi.com/2017/03/27/how-to-configure-matrix-sygnal-push-gateway-server-with-apple/
Finally, would it be helpful if I added a section about this in the element-ios documentation?
This would be wonderful if you are willing to do so 🙌
@pixlwave Finally got around to writing this up. PR. I decided to make a general configuration md and notifications as a subsection. Let me know if you prefer something else or if there is anything else.
Does the methodology discussed here apply also to the situation where someone is running his own matrix-synapse homeserver, but using standard (non custom build) of the Element iOS and Android apps?
@stavoltafunzia If you're using Element iOS from the App Store or TestFlight, then no this is not necessary to do for a custom homeserver.
@stavoltafunzia If you're using Element iOS from the App Store or TestFlight, then no this is not necessary to do for a custom homeserver.
so I build own matrix server, but use standard client - push will work ?
@x-mentat Yes, correct 👍
Steps to reproduce
Where are you starting? What can you see?
static let serverConfigSygnalAPIUrlString = "https://matrix.org/_matrix/push/v1/notify"
setting in the build pointing to the matrix run notification server.Current debugging steps
pushers
table as expected.curl https://example.org/_matrix/push/v1/notify
returns a 405, ie the server can be reached).I can't tell if this is a bug in element-ios or there if the documentation is lacking on the subject. Thank you!
Outcome
What did you expect?
Expect to see notifications.
What happened instead?
No notifications.
Your phone model
IphoneX
Operating system version
15.3.1
Application version
1.6.6
Homeserver
Synapse 1.52.0
Will you send logs?
Yes