Share multiple message with UIActivityViewController

Viewed 76

I'm a new at iOS development and I'm trying to use UIActivityViewController. I have tried to look for this answer for over 3 hours. I saw some answers that didn't work for me, here's my problem:

I would like to use UIActivityViewController to share 2 messages

I have used the following code without any success:

  NSArray* sharedObjects=[NSArray arrayWithObjects:msgOne, msgTwo,  nil];
  UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:sharedObjects applicationActivities:nil];
  activityViewController.popoverPresentationController.sourceView = self.view;
  [self presentViewController:activityViewController animated:YES completion:nil];

Unfortunately, it sends one message with a concatenation of the two strings, what I would like is two separate messages (of course without prompting the user twice).

Is that possible and if yes, how can I achieve this? Thanks!

0 Answers
Related