Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push notification issues and documentation #5735

Open
dkrasner opened this issue Mar 3, 2022 · 8 comments · May be fixed by #5988
Open

Push notification issues and documentation #5735

dkrasner opened this issue Mar 3, 2022 · 8 comments · May be fixed by #5988
Labels
A-Documentation A-Notifications T-Task Refactoring, enabling or disabling functionality, other engineering tasks

Comments

@dkrasner
Copy link

dkrasner commented Mar 3, 2022

Steps to reproduce

  1. Where are you starting? What can you see?
  • I am running a matrix-synapse homeserver and have a custom build of the element-ios app.
  • I am not running my own push notification server, such as sygnal, but have kept the default
    static let serverConfigSygnalAPIUrlString = "https://matrix.org/_matrix/push/v1/notify" setting in the build pointing to the matrix run notification server.
  • I cannot get push notifications to show up in the app. I have tested this in the simulator, local xcode build/installs, and via testflight.
  1. Current debugging steps
  • Pointing the element-ios app to my homeserver works fine for push notifications.
  • Pointing any app (custom build or element-ios) I can see pushers appearing/disappearing in the homeserver DB pushers table as expected.
  • I can reach the matrix notification sever from the homeserver instance. (For example, curl https://example.org/_matrix/push/v1/notify returns a 405, ie the server can be reached).
  • I have configured certifications for push notifications as described in the apple developer docs, or outlined [here](curl https://example.org/_matrix/push/v1/notify).
  1. More steps…
    I have reached out in the element-ios:matrix.org room and have gone through all the available documentation for element-ios, sygnal and synapse.

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

@dkrasner dkrasner added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Mar 3, 2022
@pixlwave pixlwave added T-Task Refactoring, enabling or disabling functionality, other engineering tasks A-Documentation A-Notifications and removed T-Defect Something isn't working: bugs, crashes, hangs and other reported problems labels Mar 10, 2022
@pixlwave
Copy link
Member

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.

@dkrasner
Copy link
Author

@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?

@pixlwave
Copy link
Member

pixlwave commented Mar 14, 2022

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 🙌

@dkrasner dkrasner linked a pull request Apr 5, 2022 that will close this issue
8 tasks
@dkrasner
Copy link
Author

dkrasner commented Apr 5, 2022

@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.

@stavoltafunzia
Copy link

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?

@pixlwave
Copy link
Member

pixlwave commented Apr 4, 2023

@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.

@x-mentat
Copy link

x-mentat commented Sep 6, 2023

@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 ?

@pixlwave
Copy link
Member

pixlwave commented Sep 7, 2023

@x-mentat Yes, correct 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Documentation A-Notifications T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants