-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add Documentation (Troubleshooting, Application Developers' Notes) #150
Conversation
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is some excellent documentation, thanks so much for writing all this up! I've had a comb through and pointed out some things.
Whereas data messages will wake up apps on Android with no additional changes, | ||
iOS needs to be told that a notification is meant to wake up an inactive app. | ||
This is done with the `content_available` flag, which you can set in your | ||
`fcm_options` dictionary for the Firebase pushkin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting an option for APNs is done using the fcm_options
dict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as confusing as that is, since you need to tell FCM to set the APNs flag.
If you have suggestions to clarify, I'm all ears.
(Tempted to reorder so APNs is first, that way it's harder for your eyes to latch on to the mention of 'iOS' in the Firebase section)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this section is about sending notifications to iOS through FCM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly (what a monstrosity, but people want to do it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any idea on setting apn_options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iaMeteor Please don't bump old merged PRs. But to answer your question: Sygnal does not have a config option called apn_options
.
The available options for APNs are listed here: https://github.com/matrix-org/sygnal/blob/main/sygnal.yaml.sample#L166-L199
Though note that there appears to be an unlisted option called push_type
, with these possible values:
Lines 115 to 122 in 3a6ee38
APNS_PUSH_TYPES = { | |
"alert": PushType.ALERT, | |
"background": PushType.BACKGROUND, | |
"voip": PushType.VOIP, | |
"complication": PushType.COMPLICATION, | |
"fileprovider": PushType.FILEPROVIDER, | |
"mdm": PushType.MDM, | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
@anoadragon453 Thanks for your reviews! |
This is a first pass at adding some docs, which will hopefully help all round (but especially the community).
As with most docs, always can use improvements but I eventually ran out of steam to figure out what I could add that would be useful — tempted to play it by ear and add stuff as and when it comes up.