Mohini Modi
Mohini Modi

Reputation: 11

iOS - Is it possible to share UIImage with Programatically text to WhatsApp in iOS?

NSString *texttoshare = @"Hello world....";
UIImage *image = [UIImage imageNamed:@"image.png"]
NSArray *activityItems = @[image,texttoshare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypeAirDrop];                               
[self presentViewController:activityVC animated:TRUE completion:nil];

Upvotes: 1

Views: 252

Answers (1)

ShivaPrasad
ShivaPrasad

Reputation: 926

You cant share image and text together, but you can convert image and text together has pdf and you can share pdf PDF documents (UTI: com.adobe.pdf) https://www.whatsapp.com/faq/en/iphone/23559013

Upvotes: 2

Related Questions