Repository navigation
fix(share_plus): preserve iOS URI preview titles and subjects - #4025
Open
HowardTangOvO wants to merge 1 commit into
Open
HowardTangOvO wants to merge 1 commit into
HowardTangOvO wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On iOS,
ShareParams(uri: ..., title: ..., subject: ...)currently passes only anNSURLto the activity controller. The supplied title is absent from the share-sheet preview, and the subject is discarded.Use a
UIActivityItemSourcefor URI sharing that continues to return the originalNSURL, suppliesLPLinkMetadatafor the preview, and forwards the email subject separately. The preview uses a non-empty title, falling back to the subject and then the URL. Supplying a different title and subject preserves both values independently. No public Dart API changes are required.Add native regression tests for URL payloads, separate preview titles and email subjects, and absent/empty metadata. Text and file sharing are unchanged.
Validation:
flutter testinpackages/share_plus/share_plus: 14 passed, 1 skipped.flutter analyze --no-pubin the same package: no issues.swift-format lint --strictandgit diff --checkpassed.The new UIKit XCTest cases have not been executed in an iOS test host locally. The full cross-platform test matrix has not been run locally.
Related Issues
Checklist
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles.flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!in the title as explained in Conventional Commits).