SRGSSR / playsrg-playfff

Play Features and Functionalities with Flair, a Play SRG service for Play SRG mobile applications
MIT License
1 stars 0 forks source link

Deeplink: fix web url with custom app scheme transformed to link #86

Closed pyby closed 7 months ago

pyby commented 7 months ago

Motivation and Context

First try in production #85 worked from https urls shared in mails, message or whatsapp. But it does not work on a shared url in Facebook application, which open Play web in the internal Facebook web browser.

Play web uses in html header <meta data-react-helmet="true" property="al:ios:url"palysrf://www.srf.ch/play[…]>. The JS parsePlayUrl parses correctly the urls but as the micro page url is transformed to a link?url=, it keeps the app custom scheme. It creates a loop and the application stays on the home page.

Description

Checklist

pyby commented 7 months ago

Tested with Play SRF debug build on an iOS simulator and middlewareURL configuration url using the deployment of the PR:

xcrun simctl openurl booted "playsrf-debug://www.srf.ch/play/tv/micropages/_test-serien-mit-charakter?pageId=11faeeab-eb48-4192-93cf-22e99f1543b8"

Now opening the link in Safari mobile. 💁‍♂️