-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SocialShare.shareSms does not work on iOS #146
Comments
for now, i found a work around by interpolating the URL into the SMS, and it's working, iMessage will handle the URL parsing for thumbnails |
@dhikshithrm how exactly does your share method look like ? |
Future<void> shareOnSms(String dynamicLink) async {
final String text =
"""I'm excited to start this new habit "${widget.name}" on the folksable app,
where i plan to be accountable with friends and family by posting regular
progress photos, and maintain a streak.
It would motivate me alot if you join me on this journey, and keep me accountable.
Here is the link to join: $dynamicLink
""";
await SocialShare.shareSms(text);
} This is based on observation that most sms apps do parse out the link to make it clickable with in the text itself so this will work like any text message with a link. |
@dhikshithrm And when adding a *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1f5b23f98' |
No, I hadn't modified the package inside, just used the text, and removed just checked the android platform code, if you are getting social_share/android/src/main/kotlin/com/shekarmudaliyar/social_share/SocialSharePlugin.kt Lines 181 to 194 in 073e174
|
@dhikshithrm getting the error in iOS... still no idea why. Can't make anything from the logs. btw, thanks for the help! highly appreciated |
Invoke on iOS platform:
SocialShare.shareSms('Rev Spring 2024 Ready-to-Wear\n', url: 'https://www.vogue.com/fashion-shows/spring-2024-ready-to-wear/rev/slideshow/collection', trailingText: '')
Result: Nothing happens
Reason:
The following line uses wrong SMS URL format that is not supported in iOS:
NSString *urlSchemeSms = [NSString stringWithFormat:@"sms:?&body=%@",msg];
This should be without the question mark:
NSString *urlSchemeSms = [NSString stringWithFormat:@"sms:&body=%@",msg];
Also,
urlLink
parameter is not acknowledged anywhere.The text was updated successfully, but these errors were encountered: