IceCubesApp icon indicating copy to clipboard operation
IceCubesApp copied to clipboard

Action extension that would open a deep link in the app

Open Dean151 opened this issue 2 years ago • 0 comments

This proposal adds an action in Safari's share sheet to "Open in Ice Cubes"

This action will:

  • Extract the document url using JavaScript
  • Check if the url correspond to a mastodon instance using GET /api/v2/instance mastodon API on the domain
  • Generate a deep link by replacing https:// by icecubesapp://
  • Inject back this deep link using JavaScript to the original document.

It does:

  • Open an alert to "open in Ice Cubes" from Safari when in Mastodon instance
  • Open the application thanks to the deeplink
  • Route within the app to the correct resource (thx @Dimillian) f8070a7e0a764d613fcf0cf4b2a186b83e23dd8e
  • Uses provided local packages to have access to App Scheme (in Package Model) or make the request to the API (Package Networking) df84b93f7246cc842a01e76f3cb70d7d6f0f2404

It doesn't (yet):

  • Have the polish to translate the action in all locales, or present a beautiful action icon

Any contribution appreciated to improve/complete this!

Dean151 avatar Jan 26 '23 22:01 Dean151