title: iOS sharing image and URL to whatsapp using UIActivityViewController
body: <p>Sharing image and URL using UIActivityViewController works fine for facebook and  gmail but didn't work for whatsapp. Here's the code i used</p>
  
  <pre><code>- (void)share {
      UIScreen *screen = [UIScreen mainScreen];
      UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow];
      UIGraphicsBeginImageContextWithOptions(screen.bounds.size, NO, 0);
      [keyWindow drawViewHierarchyInRect:keyWindow.bounds afterScreenUpdates:YES];
      UIImage *snapShotImage = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsEndImageContext();
      UIImage *imageToShare = snapShotImage;
  
      NSURL *urlToShare = [NSURL URLWithString:@"http://google.com"];
  
      NSMutableArray *activityItems = [NSMutableArray arrayWithObjects:urlToShare, imageToShare, nil];
  
      UIActivityViewController *activityViewController = [[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:nil];
      activityViewController.excludedActivityTypes = @[
                                                       UIActivityTypePrint,
                                                       UIActivityTypeCopyToPasteboard,
                                                       UIActivityTypeAssignToContact,
                                                       UIActivityTypeSaveToCameraRoll,
                                                       UIActivityTypeAddToReadingList,
                                                       UIActivityTypeAirDrop];
  
  
      [self presentViewController:activityViewController animated:YES completion:nil];
  }
  </code></pre>
  
  <ol>
  <li>Have I miss anything?</li>
  <li>Do i need to implement custom activity for whatsapp?</li>
  </ol>
  
  <p>Note: Incase of 2 we need to find this <a href="https://stackoverflow.com/questions/32906835/how-to-remove-original-whatsapp-uiactivity-in-uiactivityviewcontroller">hiding whatsapp from activityviewcontroller</a> solution before proceeding</p>