Skip to content

Commit 2085d1c

Browse files
authored
feat(share_plus): Show preview title in iOS share sheet (#190) (#207)
1 parent 7e8ba79 commit 2085d1c

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ Simon Lightfoot <[email protected]>
33
J-P Nurmi <[email protected]>
44
Miguel Beltran <[email protected]>
55
Neevash Ramdial <[email protected]>
6+
Andrew Teich <[email protected]>

packages/share_plus/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.0.1
2+
- Added preview title to iOS share sheet
3+
14
## 2.0.0
25

36
- Migrated to null safety

packages/share_plus/ios/Classes/FLTSharePlusPlugin.m

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
#import "FLTSharePlusPlugin.h"
6+
#import "LinkPresentation/LPLinkMetadata.h"
67

78
static NSString *const PLATFORM_CHANNEL = @"dev.fluttercommunity.plus/share";
89

@@ -89,6 +90,14 @@ - (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize {
8990
return newImage;
9091
}
9192

93+
- (LPLinkMetadata *)activityViewControllerLinkMetadata:
94+
(UIActivityViewController *)activityViewController
95+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0)) {
96+
LPLinkMetadata *metadata = [[LPLinkMetadata alloc] init];
97+
metadata.title = _text;
98+
return metadata;
99+
}
100+
92101
@end
93102

94103
@implementation FLTSharePlusPlugin

packages/share_plus/ios/share_plus.podspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Downloaded by pub (not CocoaPods).
1717
s.source_files = 'Classes/**/*'
1818
s.public_header_files = 'Classes/**/*.h'
1919
s.dependency 'Flutter'
20-
20+
s.ios.framework = 'LinkPresentation'
21+
2122
s.platform = :ios, '8.0'
2223
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
2324
end

packages/share_plus/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: share_plus
22
description: Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS.
3-
version: 2.0.0
3+
version: 2.0.1
44
homepage: https://plus.fluttercommunity.dev/
55
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
66

0 commit comments

Comments
 (0)