diff --git a/AUTHORS b/AUTHORS index 17ede94e79ba..f7a2b4b37a08 100644 --- a/AUTHORS +++ b/AUTHORS @@ -58,3 +58,4 @@ Théo Champion Kazuki Yamaguchi Eitan Schwartz Chris Rutkowski +Jorge Galvão diff --git a/packages/share/CHANGELOG.md b/packages/share/CHANGELOG.md index b06f8de45f4a..976b2a472392 100644 --- a/packages/share/CHANGELOG.md +++ b/packages/share/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.5 + +* Show the share text in the iOS share preview panel. + ## 0.6.4+3 * Post-v2 Android embedding cleanup. diff --git a/packages/share/ios/Classes/FLTSharePlugin.m b/packages/share/ios/Classes/FLTSharePlugin.m index 335ba5b819e5..a4645f9bf92e 100644 --- a/packages/share/ios/Classes/FLTSharePlugin.m +++ b/packages/share/ios/Classes/FLTSharePlugin.m @@ -3,6 +3,7 @@ // found in the LICENSE file. #import "FLTSharePlugin.h" +#import "LinkPresentation/LPLinkMetadata.h" static NSString *const PLATFORM_CHANNEL = @"plugins.flutter.io/share"; @@ -47,6 +48,14 @@ - (NSString *)activityViewController:(UIActivityViewController *)activityViewCon return [_subject isKindOfClass:NSNull.class] ? @"" : _subject; } +- (LPLinkMetadata *)activityViewControllerLinkMetadata: + (UIActivityViewController *)activityViewController + API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0)) { + LPLinkMetadata *metadata = [[LPLinkMetadata alloc] init]; + metadata.title = _text; + return metadata; +} + @end @implementation FLTSharePlugin diff --git a/packages/share/ios/share.podspec b/packages/share/ios/share.podspec index 73d6030c68cb..72009f04a5f7 100644 --- a/packages/share/ios/share.podspec +++ b/packages/share/ios/share.podspec @@ -17,6 +17,7 @@ Downloaded by pub (not CocoaPods). s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' + s.ios.framework = 'LinkPresentation' s.platform = :ios, '8.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } diff --git a/packages/share/pubspec.yaml b/packages/share/pubspec.yaml index f695dbd936c8..166b6c5e2adb 100644 --- a/packages/share/pubspec.yaml +++ b/packages/share/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/share # 0.6.y+z is compatible with 1.0.0, if you land a breaking change bump # the version to 2.0.0. # See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0 -version: 0.6.4+3 +version: 0.6.5 flutter: plugin: