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

feat: 5648 - deep link for Prices (+ OxF fixes) #5734

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/smooth_app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />


<!-- Prices -->
<data android:scheme="http" android:host="prices.openfoodfacts.org" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should add, the .net variant.
Is-it relevant @teolemon?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have a preprod, indeed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


<!-- OpenFoodFacts.org -->
<data android:scheme="http" android:host="ae.openfoodfacts.org" />
<data android:scheme="http" android:host="ar.openfoodfacts.org" />
Expand Down
299 changes: 299 additions & 0 deletions packages/smooth_app/ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:prices.openfoodfacts.org</string>

<string>applinks:ae.openfoodfacts.org</string>
<string>applinks:ar.openfoodfacts.org</string>
<string>applinks:at-en.openfoodfacts.org</string>
Expand Down Expand Up @@ -201,6 +203,303 @@
<string>applinks:www.openfoodfacts.net</string>
<string>applinks:za.openfoodfacts.net</string>
<string>applinks:zh.openfoodfacts.net</string>

<string>applinks:ae.openbeautyfacts.org</string>
<string>applinks:ar.openbeautyfacts.org</string>
<string>applinks:at-en.openbeautyfacts.org</string>
<string>applinks:at.openbeautyfacts.org</string>
<string>applinks:au.openbeautyfacts.org</string>
<string>applinks:be-de.openbeautyfacts.org</string>
<string>applinks:be-en.openbeautyfacts.org</string>
<string>applinks:be-fr.openbeautyfacts.org</string>
<string>applinks:be.openbeautyfacts.org</string>
<string>applinks:bg.openbeautyfacts.org</string>
<string>applinks:br.openbeautyfacts.org</string>
<string>applinks:ca-fr.openbeautyfacts.org</string>
<string>applinks:ca.openbeautyfacts.org</string>
<string>applinks:ch-en.openbeautyfacts.org</string>
<string>applinks:ch-fr.openbeautyfacts.org</string>
<string>applinks:ch-it.openbeautyfacts.org</string>
<string>applinks:ch.openbeautyfacts.org</string>
<string>applinks:cl.openbeautyfacts.org</string>
<string>applinks:cn-en.openbeautyfacts.org</string>
<string>applinks:cn.openbeautyfacts.org</string>
<string>applinks:co.openbeautyfacts.org</string>
<string>applinks:cz.openbeautyfacts.org</string>
<string>applinks:de-en.openbeautyfacts.org</string>
<string>applinks:de.openbeautyfacts.org</string>
<string>applinks:dk.openbeautyfacts.org</string>
<string>applinks:dz-fr.openbeautyfacts.org</string>
<string>applinks:dz.openbeautyfacts.org</string>
<string>applinks:en.openbeautyfacts.org</string>
<string>applinks:es-ca.openbeautyfacts.org</string>
<string>applinks:es-en.openbeautyfacts.org</string>
<string>applinks:es-eu.openbeautyfacts.org</string>
<string>applinks:es-gl.openbeautyfacts.org</string>
<string>applinks:es.openbeautyfacts.org</string>
<string>applinks:fi.openbeautyfacts.org</string>
<string>applinks:fr-en.openbeautyfacts.org</string>
<string>applinks:fr-es.openbeautyfacts.org</string>
<string>applinks:fr.openbeautyfacts.org</string>
<string>applinks:gf.openbeautyfacts.org</string>
<string>applinks:gp.openbeautyfacts.org</string>
<string>applinks:gr.openbeautyfacts.org</string>
<string>applinks:hk.openbeautyfacts.org</string>
<string>applinks:hk-zh.openbeautyfacts.org</string>
<string>applinks:hu.openbeautyfacts.org</string>
<string>applinks:id.openbeautyfacts.org</string>
<string>applinks:ie.openbeautyfacts.org</string>
<string>applinks:il.openbeautyfacts.org</string>
<string>applinks:in.openbeautyfacts.org</string>
<string>applinks:ir.openbeautyfacts.org</string>
<string>applinks:it.openbeautyfacts.org</string>
<string>applinks:jp.openbeautyfacts.org</string>
<string>applinks:ke.openbeautyfacts.org</string>
<string>applinks:kh.openbeautyfacts.org</string>
<string>applinks:lu.openbeautyfacts.org</string>
<string>applinks:ma-fr.openbeautyfacts.org</string>
<string>applinks:ma.openbeautyfacts.org</string>
<string>applinks:mq.openbeautyfacts.org</string>
<string>applinks:mx.openbeautyfacts.org</string>
<string>applinks:nl-en.openbeautyfacts.org</string>
<string>applinks:nl.openbeautyfacts.org</string>
<string>applinks:no.openbeautyfacts.org</string>
<string>applinks:nz.openbeautyfacts.org</string>
<string>applinks:pe.openbeautyfacts.org</string>
<string>applinks:pf.openbeautyfacts.org</string>
<string>applinks:ph.openbeautyfacts.org</string>
<string>applinks:pl-en.openbeautyfacts.org</string>
<string>applinks:pl.openbeautyfacts.org</string>
<string>applinks:openbeautyfacts.org</string>
<string>applinks:pt-en.openbeautyfacts.org</string>
<string>applinks:pt.openbeautyfacts.org</string>
<string>applinks:re.openbeautyfacts.org</string>
<string>applinks:ro.openbeautyfacts.org</string>
<string>applinks:ru-en.openbeautyfacts.org</string>
<string>applinks:ru.openbeautyfacts.org</string>
<string>applinks:sa.openbeautyfacts.org</string>
<string>applinks:se.openbeautyfacts.org</string>
<string>applinks:sg.openbeautyfacts.org</string>
<string>applinks:sg-zh.openbeautyfacts.org</string>
<string>applinks:sk.openbeautyfacts.org</string>
<string>applinks:th.openbeautyfacts.org</string>
<string>applinks:tn-en.openbeautyfacts.org</string>
<string>applinks:tn.openbeautyfacts.org</string>
<string>applinks:tr.openbeautyfacts.org</string>
<string>applinks:tw.openbeautyfacts.org</string>
<string>applinks:uk.openbeautyfacts.org</string>
<string>applinks:us-es.openbeautyfacts.org</string>
<string>applinks:us.openbeautyfacts.org</string>
<string>applinks:world-de.openbeautyfacts.org</string>
<string>applinks:world-en.openbeautyfacts.org</string>
<string>applinks:world-es.openbeautyfacts.org</string>
<string>applinks:world-fr.openbeautyfacts.org</string>
<string>applinks:world-it.openbeautyfacts.org</string>
<string>applinks:world.openbeautyfacts.org</string>
<string>applinks:world-pt.openbeautyfacts.org</string>
<string>applinks:world-ru.openbeautyfacts.org</string>
<string>applinks:world-zh.openbeautyfacts.org</string>
<string>applinks:www.openbeautyfacts.org</string>
<string>applinks:za.openbeautyfacts.org</string>
<string>applinks:zh.openbeautyfacts.org</string>

<string>applinks:ae.openproductsfacts.org</string>
<string>applinks:ar.openproductsfacts.org</string>
<string>applinks:at-en.openproductsfacts.org</string>
<string>applinks:at.openproductsfacts.org</string>
<string>applinks:au.openproductsfacts.org</string>
<string>applinks:be-de.openproductsfacts.org</string>
<string>applinks:be-en.openproductsfacts.org</string>
<string>applinks:be-fr.openproductsfacts.org</string>
<string>applinks:be.openproductsfacts.org</string>
<string>applinks:bg.openproductsfacts.org</string>
<string>applinks:br.openproductsfacts.org</string>
<string>applinks:ca-fr.openproductsfacts.org</string>
<string>applinks:ca.openproductsfacts.org</string>
<string>applinks:ch-en.openproductsfacts.org</string>
<string>applinks:ch-fr.openproductsfacts.org</string>
<string>applinks:ch-it.openproductsfacts.org</string>
<string>applinks:ch.openproductsfacts.org</string>
<string>applinks:cl.openproductsfacts.org</string>
<string>applinks:cn-en.openproductsfacts.org</string>
<string>applinks:cn.openproductsfacts.org</string>
<string>applinks:co.openproductsfacts.org</string>
<string>applinks:cz.openproductsfacts.org</string>
<string>applinks:de-en.openproductsfacts.org</string>
<string>applinks:de.openproductsfacts.org</string>
<string>applinks:dk.openproductsfacts.org</string>
<string>applinks:dz-fr.openproductsfacts.org</string>
<string>applinks:dz.openproductsfacts.org</string>
<string>applinks:en.openproductsfacts.org</string>
<string>applinks:es-ca.openproductsfacts.org</string>
<string>applinks:es-en.openproductsfacts.org</string>
<string>applinks:es-eu.openproductsfacts.org</string>
<string>applinks:es-gl.openproductsfacts.org</string>
<string>applinks:es.openproductsfacts.org</string>
<string>applinks:fi.openproductsfacts.org</string>
<string>applinks:fr-en.openproductsfacts.org</string>
<string>applinks:fr-es.openproductsfacts.org</string>
<string>applinks:fr.openproductsfacts.org</string>
<string>applinks:gf.openproductsfacts.org</string>
<string>applinks:gp.openproductsfacts.org</string>
<string>applinks:gr.openproductsfacts.org</string>
<string>applinks:hk.openproductsfacts.org</string>
<string>applinks:hk-zh.openproductsfacts.org</string>
<string>applinks:hu.openproductsfacts.org</string>
<string>applinks:id.openproductsfacts.org</string>
<string>applinks:ie.openproductsfacts.org</string>
<string>applinks:il.openproductsfacts.org</string>
<string>applinks:in.openproductsfacts.org</string>
<string>applinks:ir.openproductsfacts.org</string>
<string>applinks:it.openproductsfacts.org</string>
<string>applinks:jp.openproductsfacts.org</string>
<string>applinks:ke.openproductsfacts.org</string>
<string>applinks:kh.openproductsfacts.org</string>
<string>applinks:lu.openproductsfacts.org</string>
<string>applinks:ma-fr.openproductsfacts.org</string>
<string>applinks:ma.openproductsfacts.org</string>
<string>applinks:mq.openproductsfacts.org</string>
<string>applinks:mx.openproductsfacts.org</string>
<string>applinks:nl-en.openproductsfacts.org</string>
<string>applinks:nl.openproductsfacts.org</string>
<string>applinks:no.openproductsfacts.org</string>
<string>applinks:nz.openproductsfacts.org</string>
<string>applinks:pe.openproductsfacts.org</string>
<string>applinks:pf.openproductsfacts.org</string>
<string>applinks:ph.openproductsfacts.org</string>
<string>applinks:pl-en.openproductsfacts.org</string>
<string>applinks:pl.openproductsfacts.org</string>
<string>applinks:openproductsfacts.org</string>
<string>applinks:pt-en.openproductsfacts.org</string>
<string>applinks:pt.openproductsfacts.org</string>
<string>applinks:re.openproductsfacts.org</string>
<string>applinks:ro.openproductsfacts.org</string>
<string>applinks:ru-en.openproductsfacts.org</string>
<string>applinks:ru.openproductsfacts.org</string>
<string>applinks:sa.openproductsfacts.org</string>
<string>applinks:se.openproductsfacts.org</string>
<string>applinks:sg.openproductsfacts.org</string>
<string>applinks:sg-zh.openproductsfacts.org</string>
<string>applinks:sk.openproductsfacts.org</string>
<string>applinks:th.openproductsfacts.org</string>
<string>applinks:tn-en.openproductsfacts.org</string>
<string>applinks:tn.openproductsfacts.org</string>
<string>applinks:tr.openproductsfacts.org</string>
<string>applinks:tw.openproductsfacts.org</string>
<string>applinks:uk.openproductsfacts.org</string>
<string>applinks:us-es.openproductsfacts.org</string>
<string>applinks:us.openproductsfacts.org</string>
<string>applinks:world-de.openproductsfacts.org</string>
<string>applinks:world-en.openproductsfacts.org</string>
<string>applinks:world-es.openproductsfacts.org</string>
<string>applinks:world-fr.openproductsfacts.org</string>
<string>applinks:world-it.openproductsfacts.org</string>
<string>applinks:world.openproductsfacts.org</string>
<string>applinks:world-pt.openproductsfacts.org</string>
<string>applinks:world-ru.openproductsfacts.org</string>
<string>applinks:world-zh.openproductsfacts.org</string>
<string>applinks:www.openproductsfacts.org</string>
<string>applinks:za.openproductsfacts.org</string>
<string>applinks:zh.openproductsfacts.org</string>

<string>applinks:ae.openpetfoodfacts.org</string>
<string>applinks:ar.openpetfoodfacts.org</string>
<string>applinks:at-en.openpetfoodfacts.org</string>
<string>applinks:at.openpetfoodfacts.org</string>
<string>applinks:au.openpetfoodfacts.org</string>
<string>applinks:be-de.openpetfoodfacts.org</string>
<string>applinks:be-en.openpetfoodfacts.org</string>
<string>applinks:be-fr.openpetfoodfacts.org</string>
<string>applinks:be.openpetfoodfacts.org</string>
<string>applinks:bg.openpetfoodfacts.org</string>
<string>applinks:br.openpetfoodfacts.org</string>
<string>applinks:ca-fr.openpetfoodfacts.org</string>
<string>applinks:ca.openpetfoodfacts.org</string>
<string>applinks:ch-en.openpetfoodfacts.org</string>
<string>applinks:ch-fr.openpetfoodfacts.org</string>
<string>applinks:ch-it.openpetfoodfacts.org</string>
<string>applinks:ch.openpetfoodfacts.org</string>
<string>applinks:cl.openpetfoodfacts.org</string>
<string>applinks:cn-en.openpetfoodfacts.org</string>
<string>applinks:cn.openpetfoodfacts.org</string>
<string>applinks:co.openpetfoodfacts.org</string>
<string>applinks:cz.openpetfoodfacts.org</string>
<string>applinks:de-en.openpetfoodfacts.org</string>
<string>applinks:de.openpetfoodfacts.org</string>
<string>applinks:dk.openpetfoodfacts.org</string>
<string>applinks:dz-fr.openpetfoodfacts.org</string>
<string>applinks:dz.openpetfoodfacts.org</string>
<string>applinks:en.openpetfoodfacts.org</string>
<string>applinks:es-ca.openpetfoodfacts.org</string>
<string>applinks:es-en.openpetfoodfacts.org</string>
<string>applinks:es-eu.openpetfoodfacts.org</string>
<string>applinks:es-gl.openpetfoodfacts.org</string>
<string>applinks:es.openpetfoodfacts.org</string>
<string>applinks:fi.openpetfoodfacts.org</string>
<string>applinks:fr-en.openpetfoodfacts.org</string>
<string>applinks:fr-es.openpetfoodfacts.org</string>
<string>applinks:fr.openpetfoodfacts.org</string>
<string>applinks:gf.openpetfoodfacts.org</string>
<string>applinks:gp.openpetfoodfacts.org</string>
<string>applinks:gr.openpetfoodfacts.org</string>
<string>applinks:hk.openpetfoodfacts.org</string>
<string>applinks:hk-zh.openpetfoodfacts.org</string>
<string>applinks:hu.openpetfoodfacts.org</string>
<string>applinks:id.openpetfoodfacts.org</string>
<string>applinks:ie.openpetfoodfacts.org</string>
<string>applinks:il.openpetfoodfacts.org</string>
<string>applinks:in.openpetfoodfacts.org</string>
<string>applinks:ir.openpetfoodfacts.org</string>
<string>applinks:it.openpetfoodfacts.org</string>
<string>applinks:jp.openpetfoodfacts.org</string>
<string>applinks:ke.openpetfoodfacts.org</string>
<string>applinks:kh.openpetfoodfacts.org</string>
<string>applinks:lu.openpetfoodfacts.org</string>
<string>applinks:ma-fr.openpetfoodfacts.org</string>
<string>applinks:ma.openpetfoodfacts.org</string>
<string>applinks:mq.openpetfoodfacts.org</string>
<string>applinks:mx.openpetfoodfacts.org</string>
<string>applinks:nl-en.openpetfoodfacts.org</string>
<string>applinks:nl.openpetfoodfacts.org</string>
<string>applinks:no.openpetfoodfacts.org</string>
<string>applinks:nz.openpetfoodfacts.org</string>
<string>applinks:pe.openpetfoodfacts.org</string>
<string>applinks:pf.openpetfoodfacts.org</string>
<string>applinks:ph.openpetfoodfacts.org</string>
<string>applinks:pl-en.openpetfoodfacts.org</string>
<string>applinks:pl.openpetfoodfacts.org</string>
<string>applinks:openpetfoodfacts.org</string>
<string>applinks:pt-en.openpetfoodfacts.org</string>
<string>applinks:pt.openpetfoodfacts.org</string>
<string>applinks:re.openpetfoodfacts.org</string>
<string>applinks:ro.openpetfoodfacts.org</string>
<string>applinks:ru-en.openpetfoodfacts.org</string>
<string>applinks:ru.openpetfoodfacts.org</string>
<string>applinks:sa.openpetfoodfacts.org</string>
<string>applinks:se.openpetfoodfacts.org</string>
<string>applinks:sg.openpetfoodfacts.org</string>
<string>applinks:sg-zh.openpetfoodfacts.org</string>
<string>applinks:sk.openpetfoodfacts.org</string>
<string>applinks:th.openpetfoodfacts.org</string>
<string>applinks:tn-en.openpetfoodfacts.org</string>
<string>applinks:tn.openpetfoodfacts.org</string>
<string>applinks:tr.openpetfoodfacts.org</string>
<string>applinks:tw.openpetfoodfacts.org</string>
<string>applinks:uk.openpetfoodfacts.org</string>
<string>applinks:us-es.openpetfoodfacts.org</string>
<string>applinks:us.openpetfoodfacts.org</string>
<string>applinks:world-de.openpetfoodfacts.org</string>
<string>applinks:world-en.openpetfoodfacts.org</string>
<string>applinks:world-es.openpetfoodfacts.org</string>
<string>applinks:world-fr.openpetfoodfacts.org</string>
<string>applinks:world-it.openpetfoodfacts.org</string>
<string>applinks:world.openpetfoodfacts.org</string>
<string>applinks:world-pt.openpetfoodfacts.org</string>
<string>applinks:world-ru.openpetfoodfacts.org</string>
<string>applinks:world-zh.openpetfoodfacts.org</string>
<string>applinks:www.openpetfoodfacts.org</string>
<string>applinks:za.openpetfoodfacts.org</string>
<string>applinks:zh.openpetfoodfacts.org</string>
</array>
</dict>
</plist>
4 changes: 3 additions & 1 deletion packages/smooth_app/lib/helpers/launch_url_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class LaunchUrlHelper {
) async {
assert(url.isNotEmpty);

if (url.startsWith(RegExp('http(s)?://[a-z]*.openfoodfacts.(net|org)'))) {
if (url.startsWith(RegExp(
'http(s)?://[a-z]*.open(food|beauty|products|petfood)facts.(net|org)',
))) {
AnalyticsHelper.trackOutlink(url: url);
GoRouter.of(context).go(url);
} else {
Expand Down