Skip to content

[share_plus] Share subject does not appear in email #691

Closed

Description

@appinteractive

Description

When I try to share a link or a message vie mail, using the Share_Plus plugin on iOS (maybe both), the subject is empty, but it should contain it.

System info

Issue occurs on: iOS (maybe both)
Plugin name: Share_Plus
Plugin version: 3.0.4
Flutter doctor output:

❯ flutter doctor
Doctor summary (to see all details, run flutter
doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm,
    locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version
    31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.2)
[✓] Connected device (2 available)

• No issues found!

Steps to Reproduce

  1. Share.share('http://example.org', subject: 'my subject in case of email');
  2. choose mail from sharing dialog
  3. see that the subject is empty in all email apps

Activity

  1. changed the title [-]Share subject does not appear in mail[/-] [+]Share subject does not appear in email[/+] on Jan 11, 2022
  2. changed the title [-]Share subject does not appear in email[/-] [+][share plus] Share subject does not appear in email[/+] on Jan 11, 2022
  3. changed the title [-][share plus] Share subject does not appear in email[/-] [+][share_plus] Share subject does not appear in email[/+] on Jan 11, 2022
  4. ricardo-freiheit commented on Mar 30, 2022

    @ricardo-freiheit

    Hi, is there any update on this issue? Is there any plan to address it in a future release?

  5. appinteractive commented on Apr 7, 2022

    @appinteractive
    Author

    @Coronon @miquelbeltran could someone if you talented guys take a look? 🙂

  6. Coronon commented on Apr 7, 2022

    @Coronon
    Contributor

    @Coronon @miquelbeltran could someone if you talented guys take a look? 🙂

    I'm a little busy until the weekend but will try to look into it :)

  7. Coronon commented on Apr 10, 2022

    @Coronon
    Contributor

    I was able to reproduce the issue: It seems that Apple handles pure URL shares differently (loads the website icon and title) and therefore ignores our way of setting the subject (Because we then use NSURL instead of SharePlusDate which does not allow setting a subject).

    Works: 'Visit https://example.com'
    Does not work: 'https://example.com'

    The culprit: NSObject *data = [[NSURL alloc] initWithString:shareText];

    I have however found a way to override this behavior and still force a user chosen subject.
    Will submit a PR soon :)

    Update:
    The fix also allows setting a subject for shareFiles.

  8. Coronon commented on Apr 10, 2022

    @Coronon
    Contributor

    You can try these changes with this repo: share_plus_example

  9. miquelbeltran commented on Apr 11, 2022

    @miquelbeltran
    Member

    @ Coronon @ miquelbeltran could someone if you talented guys take a look? slightly_smiling_face

    Please do not direct quote repo members asking for updates.

  10. appinteractive commented on Apr 11, 2022

    @appinteractive
    Author

    @Coronon Thanks man! It works like a charm (on iOS) Android I can't get hold of a working mail client atm.

    @miquelbeltran sorry, I did not want to bind any resources it that was the case or skip any priorities, my intention was only to get awareness. ✌️ Was not aware of any problems in that regard 😬

  11. locked as resolved and limited conversation to collaborators on Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions