From 4c16f313c4a0244d4e94ae9993421ab2f0667d1d Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 13 Oct 2021 11:26:59 +0300 Subject: [PATCH 1/2] [share_plus_ios] fix sharing malformed urls --- .../share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m b/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m index a45dce97ec..e488c01c10 100644 --- a/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m +++ b/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m @@ -210,9 +210,10 @@ + (void)shareText:(NSString *)shareText subject:(NSString *)subject withController:(UIViewController *)controller atSource:(CGRect)origin { - NSObject *data = [shareText hasPrefix:@"https://"] - ? [[NSURL alloc] initWithString:shareText] - : [[SharePlusData alloc] initWithSubject:subject text:shareText]; + NSObject *data = [[NSURL alloc] initWithString:shareText]; + if (data == nil) { + data = [[SharePlusData alloc] initWithSubject:subject text:shareText]; + } [self share:@[ data ] withController:controller atSource:origin]; } From b2ea360595bb3525b2390625bb304a7d8d79854a Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 13 Oct 2021 11:12:56 +0300 Subject: [PATCH 2/2] add changelog and pump version --- packages/share_plus/share_plus/CHANGELOG.md | 4 ++++ packages/share_plus/share_plus/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/share_plus/share_plus/CHANGELOG.md b/packages/share_plus/share_plus/CHANGELOG.md index d06e4e890f..5194cab843 100644 --- a/packages/share_plus/share_plus/CHANGELOG.md +++ b/packages/share_plus/share_plus/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.3 + +- iOS: Fixed sharing malformed URLs + ## 3.0.2 - Apply code improvements diff --git a/packages/share_plus/share_plus/pubspec.yaml b/packages/share_plus/share_plus/pubspec.yaml index ada5b7d0d8..d0e1e883d5 100644 --- a/packages/share_plus/share_plus/pubspec.yaml +++ b/packages/share_plus/share_plus/pubspec.yaml @@ -1,6 +1,6 @@ name: share_plus description: Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS. -version: 3.0.2 +version: 3.0.3 homepage: https://plus.fluttercommunity.dev/ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/