react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

How to disable the "Open Website?" alert, when payload includes launchURL

Open Salar-g opened this issue 5 years ago • 14 comments

Description: I have a launchURL in my notification payload. LaunchURL is used for navigating to a specific page using deep linking. However every time a notification is received, an Alert also pops-up that says "Open Website? Would you like to open myApp:main..". The deep-linking works as expect. I wonder if there is was prevent this Alert to pop-up.

(your description here)

Environment "react-native-onesignal": "^3.6.4", "react-native": "0.61.2",

Steps to Reproduce Issue:

  1. Install the OneSignal SDK using npm into your project
  2. add deep linking
  3. send a notification with launchURL
  4. the below notification will be shown

Screen Shot 2021-01-09 at 8 16 48 PM

Related: #1016

Salar-g avatar Jan 10 '21 01:01 Salar-g

Duplicate of https://github.com/OneSignal/react-native-onesignal/issues/1140

rgomezp avatar Jan 13 '21 21:01 rgomezp

@rgomezp you closed this as a duplicate of #1140 (which is... this ticket). Did you mean it's a dupe of OneSignal/OneSignal-iOS-SDK#777? just want to make sure the work to fix it is being tracked.

dickfickling avatar Jan 30 '21 04:01 dickfickling

Yes. It was a mistake. Thanks for pointing that out.

rgomezp avatar Jan 30 '21 04:01 rgomezp

Hi @rgomezp, I don't think this is technically a duplicate of the iOS issue #777.

The iOS issue wants to disable the "Open Website" alert so that the deeplink it could be handled natively, whereas on the React Native side I'm assuming most of us just want it to automatically open the deeplink without the alert? It seems like 2 different expected behaviours.

stu-dev avatar Feb 18 '21 20:02 stu-dev

Yes I just disabled the iOS prompt now deep linking no longer works automatically.

I tried to manually handle launchURL in setNotificationOpenedHandler but it doesn't seem to work on cold launch from notification.

leethree avatar Feb 19 '21 11:02 leethree

Still seeing this issue! The alerts have gone, but deep linking isn't working. If you have any hints on how to fix it @rgomezp I am happy to do a PR.

Thanks!

tomwhale avatar Feb 19 '21 22:02 tomwhale

Howdy everyone, We did resolve the native SDK issue 777 in the latest release which updates the underlying native iOS SDK to the version with the fix.

@stu-dev can you please upgrade and try that release to see if the issue is resolved?

rgomezp avatar Feb 22 '21 19:02 rgomezp

@rgomezp I can confirm the Alert no longer shows, but deep linking does not work.

tomwhale avatar Feb 22 '21 19:02 tomwhale

Hi @rgomezp to echo what @tomwhale said - on upgrade the message disappears but now deep linking does not work properly

stu-dev avatar Feb 25 '21 08:02 stu-dev

Thanks everyone for the info.

@gonzalonarbaiz is investigating.

To confirm, this deep linking issue was not occurring for you prior to the alert issue correct?

rgomezp avatar Feb 25 '21 15:02 rgomezp

Hi,

It was happening before. From the app closed state, the deep linking did not work.

Something was released which caused the alert prompt when deeplinking. Deeplinking worked, but we had the alert which was not ideal.

Then another fix went out which fixed the alert, but deep linking no longer works again.

tomwhale avatar Mar 02 '21 10:03 tomwhale

Any update on this?

azai91 avatar Mar 03 '21 17:03 azai91

Related: #1016

rgomezp avatar Mar 03 '21 21:03 rgomezp

Howdy, Since the alert is resolved, I will close this issue.

The deeplinking issue is covered by #1016 . Please continue tracking the issue there.

rgomezp avatar Mar 03 '21 21:03 rgomezp