brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 440 forks source link

Add Open in Brave to iOS Share Sheet Action (Action Extension) #8516

Closed soner-yuksel closed 9 months ago

soner-yuksel commented 11 months ago

Problem Description

Brave Browser should appear in OS default Share Sheet for URL related actions. This will provide extra visibility and easy access to Brave users on iOS thorough other applications while using the Share Sheet.

Feature Overview

Adding Brave as Action Extension on iOS will add Open in Brave action to default share sheet. So Brave can be reached outside the application environment. It will also help for users having multiple browsers and want to use Brave for certain actions or links.

1

Design

There is no design choice to be made here but it will look like the actions shown in he example

Implementation Details

Action extensions are displayed in the action view controller, accessed by users when they tap the Share button within an active application. These extensions are situated in the action section of this panel, alongside default actions like printing and copying content.

When an Action extension is developed, it needs to specify the content types it is capable of handling.

For Brave's case this should be

NSExtensionActivationSupportsText NSExtensionActivationSupportsWebPageWithMaxCount NSExtensionActivationSupportsWebURLWithMaxCount

User Experience

  1. Open any app and share url or text
  2. Check share sheet has open in brave action
  3. this share functionality should search the text in brave or open link

Additional information

It needs be tested and implemented to see if this behaviour could be possible to detect it is a text or link and do desired action according to it.

kylehickinson commented 11 months ago

How is this different than the Open in Brave share extension we already have? Is it just so there's another option?

soner-yuksel commented 11 months ago

Pretty much yes, so as far as I understood share extension covers the top section with coloured app actions and no action text.

But this action extension actually adds it to the list in bottom section with monochromatic icon and we can define a localizable text to the action that will be performed. It is much more visible and we can actually add different types of actions here. (Not just opening links maybe)

anthonypkeane commented 11 months ago

In terms of text,

Open in Brave should easily fix in english and other languages

Open in Brave Browser is better but it is prod too long.

Uni-verse commented 8 months ago

Verified on iPhone 12 running iOS 17.3.1 using version 1.63 (161)

Example Example Example Example Example
IMG_5740 IMG_5750 IMG_5741 IMG_5742 IMG_5743

Opening links with text

Example Example
IMG_5748 IMG_5749