diff --git a/src/ios/SocialSharing.m b/src/ios/SocialSharing.m index ecb71b50..1e9d99f8 100644 --- a/src/ios/SocialSharing.m +++ b/src/ios/SocialSharing.m @@ -510,9 +510,10 @@ - (void)shareViaSMS:(CDVInvokedUrlCommand*)command { if (image != nil && image != (id)[NSNull null]) { BOOL canSendAttachments = [[MFMessageComposeViewController class] respondsToSelector:@selector(canSendAttachments)]; if (canSendAttachments) { - NSURL *file = [self getFile:image]; - if (file != nil) { - [picker addAttachmentURL:file withAlternateFilename:nil]; + UIImage *uiImg = [self getImage:image]; + if (uiImg != nil) { + NSData *dataImg = UIImagePNGRepresentation(uiImg); + [picker addAttachmentData:dataImg typeIdentifier:@"public.data" filename:@"Image.png"]; } } }