openfoodfacts/openfoodfacts-ios

Allow other apps to open OFF by introducing URL Schema

UlricusR opened this issue · 1 comments

Summary:

This is a feature request to allow other apps to open OFF and directly navigate to a product. Unfortunately I cannot implement it myself (as discussed on Slack) as I cannot downgrade XCode due to my other projects.

Steps to implement:

The relevant documentation can be found here: https://developer.apple.com/documentation/xcode/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app

You need to modify Info.plist:

  • Add URL types property
  • Add URL Schemas as sub-property below it
  • Add e.g. openfoodfactsapp as unique identifier as value to the URL Schemas property
  • Make sure that a passed parameter, e.g. productcode, will open the product page