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

Deep linking doesn't work for background mode #2041

Closed
aksonov opened this issue Mar 26, 2018 · 14 comments
Closed

Deep linking doesn't work for background mode #2041

aksonov opened this issue Mar 26, 2018 · 14 comments
Assignees
Labels
PRODUCTION This issue affects the production environment

Comments

@aksonov
Copy link
Contributor

aksonov commented Mar 26, 2018

No description provided.

@aksonov
Copy link
Contributor Author

aksonov commented Mar 26, 2018

Looks related zo0r/react-native-push-notification#17

@aksonov
Copy link
Contributor Author

aksonov commented Mar 26, 2018

Okey, it is not a bug, but 'feature' of iOS push notifications - they don't work "by default" for background mode. To make it work for background programmers use some trick - include "content-available": 1, for example:

{
  payload: {"yourField":"goes here"}, 
  aps: {"sound": "default", "category": "cat", "content-available": 1}
}

@toland @bernardd Please add this flag to our push notifications.

P. S. Unfortunately I didn't found easy way to test pushes - only via testflight, so please prepare for possible several deployments until we found correct way.

aksonov pushed a commit that referenced this issue Mar 26, 2018
@southerneer
Copy link
Contributor

We can use this to test raw push notification payloads without backend changes https://github.com/noodlewerk/NWPusher

@bernardd
Copy link

The documentation in our library for content-available says that it's used for "silent" notifications, and that sound, alert, and badge should all not be set if it's used. We don't set the first two, but we do set the last (to 1). I'm happy to set it if you think that will fix the issue, but I'm not really across notifications enough to promise it won't break some other behaviour.

@bengtan
Copy link
Contributor

bengtan commented Mar 27, 2018

Back in January, we had a similar discussion (#1717).

I'm going to paste some snippets here:

#1717 (comment):

I looked through two docs:

trouble-shooting.md [1]

CreatingtheNotificationPayload.html [2]

[1] is contradictory.

It talks about 'mixed' remote push notifications but:

  • There is no such thing in the official Apple docs [2]

  • The examples they give for a 'noisy' push notification and a 'mixed' push notification look the same. It's not clear what the syntax difference is (that would turn a 'noisy' push notification into a 'mixed' push notification).

I'm calling [1] rubbish.

#1717 (comment):

I found a tool that will let you send push notifications from your macbook. This will make it easier to test, bypassing the Wocky server entirely.

https://github.com/hippware/tr-wiki/wiki/Sending-iOS-push-notifications-from-the-command-line

I think this 'mixed mode push notification' thing needs more diagnosis. It doesn't fully make sense.

The tool will let you experiment and research, by allowing you to embed custom data into the push notifications that you send.

@bengtan
Copy link
Contributor

bengtan commented Mar 27, 2018

@aksonov,

I think you should use a tool (either the one I mentioned or else the one @southerneer mentioned) to allow you to test push notifications yourself.

There's enough uncertainty that I don't expect we'll get it right first time, and testing by making server side changes ... is a very long feedback loop.

It would be much quicker if you can send push notifications yourself.

@aksonov
Copy link
Contributor Author

aksonov commented Mar 27, 2018

@mstidham , @zavreb I was not able to reproduce this bug with manual push sending with development mode. Please check latest 2.3.1

@mstidham
Copy link

Verified on Staging Version 2.3.1

@bengtan
Copy link
Contributor

bengtan commented Mar 28, 2018

@aksonov,

IIRC, the recent change that fixed this ticket also (accidentally) enabled 'foreground' notifications?

So, maybe after that is undone, this ticket should go back to 'In progress', or we should ask QA to specifically test push notifications?

What do you think?

@bengtan
Copy link
Contributor

bengtan commented Mar 28, 2018

IIRC, the recent change that fixed this ticket also (accidentally) enabled 'foreground' notifications?

Oh, I think this was picked up as ticket #2045.

@zavreb
Copy link

zavreb commented Apr 2, 2018

Verified on Staging Version 2.3.1 with messages and bot shares.

@mstidham
Copy link

mstidham commented Apr 3, 2018

Verified on Prod Version: 2.3.1 with messages and bot shares

@mstidham
Copy link

Verified on Production Version: 2.6.7

1 similar comment
@zavreb
Copy link

zavreb commented May 17, 2018

Verified on Production Version: 2.6.7

@zavreb zavreb closed this as completed May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PRODUCTION This issue affects the production environment
Projects
None yet
Development

No branches or pull requests

6 participants