You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[share_plus] Share subject does not appear in email #691
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
Share.share('http://example.org', subject: 'my subject in case of email');
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).
@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 😬
Activity
[-]Share subject does not appear in mail[/-][+]Share subject does not appear in email[/+][-]Share subject does not appear in email[/-][+][share plus] Share subject does not appear in email[/+][-][share plus] Share subject does not appear in email[/-][+][share_plus] Share subject does not appear in email[/+]ricardo-freiheit commentedon Mar 30, 2022
Hi, is there any update on this issue? Is there any plan to address it in a future release?
appinteractive commentedon Apr 7, 2022
@Coronon @miquelbeltran could someone if you talented guys take a look? 🙂
Coronon commentedon Apr 7, 2022
I'm a little busy until the weekend but will try to look into it :)
Coronon commentedon Apr 10, 2022
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
NSURLinstead ofSharePlusDatewhich 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.Coronon commentedon Apr 10, 2022
You can try these changes with this repo: share_plus_example
miquelbeltran commentedon Apr 11, 2022
Please do not direct quote repo members asking for updates.
appinteractive commentedon Apr 11, 2022
@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 😬