fluttercommunity / fluttercommunity/plus_plugins

[Request]: In share_plus, make it possible to pass `excludedActivityTypes` to iOS

Open
#3,075 0 comments 4 reactions 0 assignees View on GitHub
enhancement triage
Dominant language
Dart
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

### Plugin

share_plus

### Use case

In Order to fullfill the [MASVS-PLATFORM-1](https://mas.owasp.org/MASVS/controls/MASVS-PLATFORM-1/) requirement, one should, according to [MASTG-TEST-0071](https://mas.owasp.org/MASTG/tests/ios/MASVS-PLATFORM/MASTG-TEST-0071/) ensure that when sharing is used, only desired activity types are allowed.

For native iOS, this is done by adding the excluded [ActivityTypes](https://developer.apple.com/documentation/uikit/uiactivity/activitytype) to [UIActivityViewController.excludedActivityTypes](https://developer.apple.com/documentation/uikit/uiactivityviewcontroller/1622009-excludedactivitytypes) before presenting the controller. However, the share_plus plugin currently does not allow to pass this information to the native implementation.

### Proposal

I would propose to introduce a new optional named parameter `iosExcludedActivityTypes` that takes a nullable list of a dart-mapped `ActivityTypes` enum. This parameter can then be passed to the iOS implementation and be used there to populate the `UIActivityViewController.excludedActivityTypes`. It would be a simple, non breaking change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.