fluttercommunity / plus_plugins

Flutter Community Plus Plugins
BSD 3-Clause "New" or "Revised" License
1.55k stars 921 forks source link

[Bug]: Share_plus not coyping attached image and accompanying text. #2849

Closed nicolasvahidzein closed 4 months ago

nicolasvahidzein commented 4 months ago

Platform

ios

Plugin

share_plus

Version

7.2.1

Flutter SDK

3.16.0

Steps to reproduce

Use the code provided below to attach an image generate from a qrcode and an accompanying message to share via whatsapp. Using package v 7.2.1

when text and subject are used together on ios no image is attached.

Code Sample

this works (just a file):  final result = await Share.shareXFiles( [XFile(filePath)], );  this works (file with file name): ``` final result = await Share.shareXFiles( [XFile(filePath)], text: shareInfoPrompt ); ``` this fails both text and subjet: ``` final result = await Share.shareXFiles( [XFile(filePath)], subject: fileName, text: shareInfoPrompt ); ```

Logs

2024-04-19 14:53:30.501438+0100 Runner[4265:934769] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2024-04-19 14:53:30.501493+0100 Runner[4265:934769] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-04-19 14:53:30.501527+0100 Runner[4265:934769] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2024-04-19 14:53:30.504110+0100 Runner[4265:934769] [default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)
2024-04-19 14:53:30.505590+0100 Runner[4265:934769] [LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView that is managed by a UICollectionView is not supported, and will result in incorrect self-sizing. View: <_UIActivityContentFooterView: 0x12c0c9b70; baseClass = UICollectionReusableView; frame = (20 1210.33; 374 52); layer = <CALayer: 0x2811d0020>>
2024-04-19 14:53:30.537772+0100 Runner[4265:934769] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2024-04-19 14:53:30.537833+0100 Runner[4265:934769] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2024-04-19 14:53:30.537866+0100 Runner[4265:934769] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2024-04-19 14:53:30.537990+0100 Runner[4265:934769] [default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)
2024-04-19 14:53:30.601515+0100 Runner[4265:934769] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x2832b0c30 UIView:0x12c00b0c0.height >= _UIActivityActionCellTitleLabel:0x12c036bd0.height + 30 (active)>",
"<NSLayoutConstraint:0x2832b06e0 _UIActivityActionCellTitleLabel:0x12c036bd0.height >= 22 (active)>",
"<NSLayoutConstraint:0x2832df340 'UIView-Encapsulated-Layout-Height' UIView:0x12c00b0c0.height == 30 (active)>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2832b06e0 _UIActivityActionCellTitleLabel:0x12c036bd0.height >= 22 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2024-04-19 14:53:30.602496+0100 Runner[4265:934769] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x28328ee40 UIView:0x12c08a280.height >= _UIActivityActionCellTitleLabel:0x12c06c760.height + 30 (active)>",
"<NSLayoutConstraint:0x28328edf0 _UIActivityActionCellTitleLabel:0x12c06c760.height >= 22 (active)>",
"<NSLayoutConstraint:0x2832dea30 'UIView-Encapsulated-Layout-Height' UIView:0x12c08a280.height == 30 (active)>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x28328edf0 _UIActivityActionCellTitleLabel:0x12c06c760.height >= 22 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

Flutter Doctor

[✓] Flutter (Channel stable, 3.16.0, on macOS 13.6 22G120 darwin-x64, locale en-US)
    • Flutter version 3.16.0 on channel stable at /Applications/Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (5 months ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/nicolas/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (3 available)
    • BananaPhone (mobile) • 00008020-0001555E3679002E • ios            • iOS 15.2.1 19C63
    • macOS (desktop)      • macos                     • darwin-x64     • macOS 13.6 22G120 darwin-x64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 124.0.6367.61

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

miquelbeltran commented 4 months ago

Please read the README, it already contains information regarding Meta apps like Whatsapp and their limitations.

nicolasvahidzein commented 4 months ago

Miguel the read me is problematic. It is working with whatsapp. On android its perfect. The issue is on ios. When both variable text and subject are used concurrently that happens. How is that related to meta apps?