appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
193 stars 224 forks source link

[ BUG ] : shareToSystem on iOS if clicking on Instagram get error multiple photos not allowed #321

Open riccardo-rusca opened 3 days ago

riccardo-rusca commented 3 days ago

Plugin name Appinio social share 0.3.2

Describe the bug When trying to share a single photo to Instagram via default system share sheet, I get an error saying that it is not possible to share multiple photos and video on Instagram.

To Reproduce Steps to reproduce the behavior: final pngBytes = ... final directory = await getApplicationDocumentsDirectory(); final path = directory.path; File file = File('$path/image'); await file.writeAsBytes(pngBytes); await appinioSocialShare.iOS.shareToSystem( 'Check my image!', filePaths: [file.path], );

Expected behavior Be able to share a single image to Instagram as I can do from any photo, without any text

Screenshots IMG_5F13F053B9D9-1

Desktop (please complete the following information):

Smartphone (please complete the following information):

riccardo-rusca commented 1 day ago

If someone is interested I changed the behavior here: https://github.com/riccardo-rusca/flutter_social_share.git Now there are two functions for iOS:

  1. Future shareToSystem(String message, String? filePath)
  2. Future shareFilesToSystem({List? filePaths})

The first one fix the Instagram bug, allowing to share just a single image. the old behavior is implemented in the second function.