Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/share/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.3

* Resolve a crash when not setting the subject variable and sharing to Mail.

## 0.6.2+2

* Update and migrate iOS example project.
Expand Down
6 changes: 4 additions & 2 deletions packages/share/ios/Classes/SharePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
NSNumber *originWidth = arguments[@"originWidth"];
NSNumber *originHeight = arguments[@"originHeight"];

CGRect originRect;
CGRect originRect = CGRectZero;
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
originRect = CGRectMake([originX doubleValue], [originY doubleValue],
[originWidth doubleValue], [originHeight doubleValue]);
Expand All @@ -55,7 +55,9 @@ + (void)share:(id)sharedItems
UIActivityViewController *activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:@[ sharedItems ]
applicationActivities:nil];
[activityViewController setValue:subject forKey:@"subject"];
if (subject && ![subject isKindOfClass:[NSNull class]]) {
[activityViewController setValue:subject forKey:@"subject"];
}
activityViewController.popoverPresentationController.sourceView = controller.view;
if (!CGRectIsEmpty(origin)) {
activityViewController.popoverPresentationController.sourceRect = origin;
Expand Down
2 changes: 1 addition & 1 deletion packages/share/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for sharing content via the platform share UI, using
the ACTION_SEND intent on Android and UIActivityViewController on iOS.
author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/share
version: 0.6.2+2
version: 0.6.3

flutter:
plugin:
Expand Down