Share actions not showing up in the Share menu.

RESOLVED FIXED in 1.4

Status

()

Firefox for iOS
Browser
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: jhugman, Assigned: jhugman)

Tracking

unspecified
All
iOS

Firefox Tracking Flags

(fxios1.4+)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
"I noticed that none of our actions are available from within Firefox itself. They all show up in other apps, like Safari but in Firefox the three share options are gone.

Other share extensions, like Twitter, are also not shown anymore.

Works in 1.2 but not in 1.3. Most likely related to 1Password and the type of items we share out?

Can you open a bug for this and investigate please? Needs to be fixed otherwise we cannot ship this for 1.3. It is too big of a regression"
(Assignee)

Comment 1

3 years ago
Twitter not showing up in master or v1.x.

Suspect the Info.plist in Client, ShareTo and SendTo. Checking…
(Assignee)

Comment 2

3 years ago
Reverting the Info.plist changes hasn't changed anything. 

Not using the UIActivityItemSource as an activityItem does cause the problem to change; but does disable the feature.
(Assignee)

Updated

3 years ago
tracking-fxios: --- → ?
(Assignee)

Comment 4

3 years ago
Adding in logging for hitting the share menu button:

activityViewControllerPlaceholderItem is https://en.m.wikipedia.org/wiki/Main_Page
dataTypeIdentifierForActivityType nil

Selecting a menu option:

itemForActivityType com.apple.UIKit.activity.Print

This method gets called when the share menu is about to be displayed, but activityType is always nil.

     func activityViewController(activityViewController: UIActivityViewController, dataTypeIdentifierForActivityType activityType: String?) -> String {
        // Because of our UTI declaration, this UTI now satisfies both the 1Password Extension and the usual NSURL for Share extensions.
        print("dataTypeIdentifierForActivityType \(activityType)")
        return "org.appextension.fill-browser-action"
    }
(Assignee)

Comment 5

3 years ago
Reading more about NSActivationRule, I'm still suspicious of ours in Info.plist.

Changing:

SUBQUERY ( 
	extensionItems, 
	$extensionItem, 
		SUBQUERY ( 
			$extensionItem.attachments, 
			$attachment,
			ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
		).@count == 1 
).@count == 1

to:

SUBQUERY (
	extensionItems,
	$extensionItem,
	SUBQUERY (
		$extensionItem.attachments,
		$attachment,
		(
			ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf"
			|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
			|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url"
			|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
		)
	).@count == $extensionItem.attachments.@count
).@count == 1

in SendTo/Info.plist makes our extension show up. Still no twitter though.
(Assignee)

Comment 6

3 years ago
The ShareTo/Info.plist and SendTo/Info.plist NSActivationRules are for extensions to select which applications an extension can open in.

> NSExtensionActivationRules should only need to match a single activity item for a share extension to be displayed
> http://openradar.appspot.com/radar?id=5616559737274368

Adding the ShareExtensionHelper (a UIActivityItemSource) into the items array means that extensions no longer match all items.

Checking how we might make the items array only have one item in.
(Assignee)

Comment 7

3 years ago
Created attachment 8693541 [details] [review]
Pull request

Fix provided by rad@agilebits.com
Attachment #8693541 - Flags: review?(sarentz)
(Assignee)

Comment 8

3 years ago
Needs uplift, once landed.
Comment on attachment 8693541 [details] [review]
Pull request

LGTM
Attachment #8693541 - Flags: review?(sarentz) → review+
Whiteboard: [needsuplift]
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Assignee: nobody → jhugman
Whiteboard: [needsuplift]
This either made 1.4 or 1.3.
tracking-fxios: ? → 1.4+
Hardware: Other → All
Target Milestone: --- → 1.4
You need to log in before you can comment on or make changes to this bug.