diff --git a/packages/share_plus/share_plus/CHANGELOG.md b/packages/share_plus/share_plus/CHANGELOG.md index bbcb89f3cd..a6cb414fbd 100644 --- a/packages/share_plus/share_plus/CHANGELOG.md +++ b/packages/share_plus/share_plus/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.5 + +- Fixed: Use NSURL for web links (iOS) + ## 2.1.4 - Android: migrate to mavenCentral diff --git a/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m b/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m index 1caf92d5f7..a45dce97ec 100644 --- a/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m +++ b/packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m @@ -210,7 +210,9 @@ + (void)shareText:(NSString *)shareText subject:(NSString *)subject withController:(UIViewController *)controller atSource:(CGRect)origin { - SharePlusData *data = [[SharePlusData alloc] initWithSubject:subject text:shareText]; + NSObject *data = [shareText hasPrefix:@"https://"] + ? [[NSURL alloc] initWithString:shareText] + : [[SharePlusData alloc] initWithSubject:subject text:shareText]; [self share:@[ data ] withController:controller atSource:origin]; } diff --git a/packages/share_plus/share_plus/pubspec.yaml b/packages/share_plus/share_plus/pubspec.yaml index a5e1026433..25b3b34434 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: 2.1.4 +version: 2.1.5 homepage: https://plus.fluttercommunity.dev/ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/